@@ -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);
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> --- hw/arm/xilinx_zynq.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)