[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
- [Qemu-devel] [RFC PATCH 00/34] Multi Architecture System Emulation, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 33/34] HACK: mb: boot: Assume using -firmware for mb software, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 34/34] HACK: mb: boot: Disable dtb load in multi-arch, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 32/34] arm: xilinx_zynq: Add a microblaze,
Peter Crosthwaite <=
- [Qemu-devel] [RFC PATCH 31/34] arm: boot: Don't assume all CPUs are ARM, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 29/34] arm: cpu: Multi-define guard deep CPU specifics, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 30/34] arm: Enable multi-arch, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 28/34] arm: cpu: Guard cpu_init definition for user mode, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 27/34] hw: arm: Explicitly include cpu.h for consumers, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 25/34] arm: cpu: Move CPU_COMMON to front of env, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 26/34] arm: Use qomified tcg defintions, Peter Crosthwaite, 2015/05/11
- [Qemu-devel] [RFC PATCH 22/34] arm: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/05/11