[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 32/34] arm: xilinx_zynq: Add a Microblaze
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC v2 32/34] arm: xilinx_zynq: Add a Microblaze |
Date: |
Sat, 30 May 2015 23:12:05 -0700 |
From: Peter Crosthwaite <address@hidden>
Add a Microblaze processor with full system visibility to the machine
model. This emulates a single Microblaze implemented in the Zynq SoC
programmable logic.
Use the standard microblaze bootloader to loader software.
Conditionally compile these components on TARGET_MULTI so the board
still can be used for arm single-arch.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
hw/arm/xilinx_zynq.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index a4e7b5c..d583871 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -25,6 +25,11 @@
#include "sysemu/block-backend.h"
#include "hw/loader.h"
#include "hw/ssi.h"
+
+#ifdef TARGET_MULTI
+#include "hw/microblaze/boot.h"
+#endif
+
#include "qemu/error-report.h"
#define NUM_SPI_FLASHES 4
@@ -110,6 +115,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 +168,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 v2 23/34] arm: cpu: static inline cpu_arm_init, (continued)
- [Qemu-devel] [RFC v2 23/34] arm: cpu: static inline cpu_arm_init, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 24/34] target-arm: Split cp helper API to new C file, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 26/34] core: Introduce multi-arch build, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 25/34] arm: enable multi-arch, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 27/34] hw: arm: Explicitly include cpu.h for consumers, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 28/34] arm: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 29/34] hw: mb: Explicitly include cpu.h for consumers, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 30/34] mb: Remove ELF_MACHINE from cpu.h, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 31/34] arm: boot: Don't assume all CPUs are ARM, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 32/34] arm: xilinx_zynq: Add a Microblaze,
Peter Crosthwaite <=
- [Qemu-devel] [RFC v2 33/34] HACK: mb: boot: Assume using -firmware for mb software, Peter Crosthwaite, 2015/05/31
- [Qemu-devel] [RFC v2 34/34] HACK: mb: boot: Disable dtb load in multi-arch, Peter Crosthwaite, 2015/05/31