qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 32/34] arm: xilinx_zynq: Add a microblaze


From: Peter Crosthwaite
Subject: [Qemu-devel] [RFC PATCH 32/34] arm: xilinx_zynq: Add a microblaze
Date: Sun, 10 May 2015 23:29:35 -0700

Signed-off-by: Peter Crosthwaite <address@hidden>
---
 hw/arm/xilinx_zynq.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index a4e7b5c..0f2da84 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -25,6 +25,9 @@
 #include "sysemu/block-backend.h"
 #include "hw/loader.h"
 #include "hw/ssi.h"
+
+#include "hw/microblaze/boot.h"
+
 #include "qemu/error-report.h"
 
 #define NUM_SPI_FLASHES 4
@@ -110,6 +113,9 @@ static void zynq_init(MachineState *machine)
     const char *initrd_filename = machine->initrd_filename;
     ObjectClass *cpu_oc;
     ARMCPU *cpu;
+#ifdef TARGET_MULTI
+    MicroBlazeCPU *mb_cpu;
+#endif
     MemoryRegion *address_space_mem = get_system_memory();
     MemoryRegion *ext_ram = g_new(MemoryRegion, 1);
     MemoryRegion *ocm_ram = g_new(MemoryRegion, 1);
@@ -160,6 +166,13 @@ static void zynq_init(MachineState *machine)
         ram_size = 0x80000000;
     }
 
+#ifdef TARGET_MULTI
+    mb_cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+    object_property_set_bool(OBJECT(mb_cpu), true, "realized", &error_abort);
+    microblaze_load_kernel(mb_cpu, 0, ram_size, NULL, NULL, NULL);
+#endif
+
+
     /* DDR remapped to address zero.  */
     memory_region_allocate_system_memory(ext_ram, NULL, "zynq.ext_ram",
                                          ram_size);
-- 
1.9.1




reply via email to

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