[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH target-arm v5 07/10] arm/xilinx_zynq: Implement CBAR
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PATCH target-arm v5 07/10] arm/xilinx_zynq: Implement CBAR initialisation |
Date: |
Sun, 15 Dec 2013 18:32:13 -0800 |
Fix the CBAR initialisation by using the newly defined static property.
Zynq will now correctly init the CBAR to the SCU base address.
Needed to boot Linux on the xilinx_zynq machine model.
Signed-off-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
changed since v1:
use error report rather than fprintf(stderr
rename SCU_BASE_ADDR to MPCORE_PERIPHBASE
hw/arm/xilinx_zynq.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 1c954a3..17251c7 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -36,6 +36,8 @@
#define IRQ_OFFSET 32 /* pic interrupts start from index 32 */
+#define MPCORE_PERIPHBASE 0xF8F00000
+
static const int dma_irqs[8] = {
46, 47, 48, 49, 72, 73, 74, 75
};
@@ -122,6 +124,11 @@ static void zynq_init(QEMUMachineInitArgs *args)
cpu = ARM_CPU(object_new(object_class_get_name(cpu_oc)));
+ object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar",
&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));
@@ -160,7 +167,7 @@ static void zynq_init(QEMUMachineInitArgs *args)
qdev_prop_set_uint32(dev, "num-cpu", 1);
qdev_init_nofail(dev);
busdev = SYS_BUS_DEVICE(dev);
- sysbus_mmio_map(busdev, 0, 0xF8F00000);
+ sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE);
sysbus_connect_irq(busdev, 0,
qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ));
--
1.8.5.1
- [Qemu-devel] [PATCH target-arm v5 00/10] Fix Support for ARM CBAR and reset-hivecs, Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 01/10] target-arm/helper.c: Allow cp15.c15 dummy override, Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 02/10] target-arm: Define and use ARM_FEATURE_CBAR, Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 03/10] target-arm/cpu: Convert reset CBAR to a property, Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 04/10] arm/highbank: Use object_new() rather than cpu_arm_init(), Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 05/10] arm/highbank: Fix CBAR initialisation, Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 06/10] arm/xilinx_zynq: Use object_new() rather than cpu_arm_init(), Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 07/10] arm/xilinx_zynq: Implement CBAR initialisation,
Peter Crosthwaite <=
- [Qemu-devel] [PATCH target-arm v5 08/10] arm/highbank.c: Fix MPCore periphbase name, Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 09/10] ARM: cpu: add "reset_hivecs" property, Peter Crosthwaite, 2013/12/15
- [Qemu-devel] [PATCH target-arm v5 10/10] ARM: arm_cpu_reset: make it possible to use high vectors for reset_exc, Peter Crosthwaite, 2013/12/15
- Re: [Qemu-devel] [PATCH target-arm v5 00/10] Fix Support for ARM CBAR and reset-hivecs, Peter Maydell, 2013/12/16