qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH arm-midr v1 2/2] ZYNQ: Implement board MIDR control


From: Alistair Francis
Subject: [Qemu-devel] [PATCH arm-midr v1 2/2] ZYNQ: Implement board MIDR control for Zynq
Date: Mon, 13 Jan 2014 09:33:41 +1000

This patch uses the fact that the midr variable is now a property
This patch sets the midr variable to the boards custom midr

Signed-off-by: Alistair Francis <address@hidden>
---

 hw/arm/xilinx_zynq.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 17251c7..e35fd07 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -37,6 +37,7 @@
 #define IRQ_OFFSET 32 /* pic interrupts start from index 32 */
 
 #define MPCORE_PERIPHBASE 0xF8F00000
+#define ZYNQ_BOARD_MIDR 0x413FC090
 
 static const int dma_irqs[8] = {
     46, 47, 48, 49, 72, 73, 74, 75
@@ -129,6 +130,12 @@ static void zynq_init(QEMUMachineInitArgs *args)
         error_report("%s", error_get_pretty(err));
         exit(1);
     }
+
+    object_property_set_int(OBJECT(cpu), ZYNQ_BOARD_MIDR, "midr", &err);
+    if (err) {
+        error_report("%s", error_get_pretty(err));
+        exit(1);
+    }
     object_property_set_bool(OBJECT(cpu), true, "realized", &err);
     if (err) {
         error_report("%s", error_get_pretty(err));
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]