提交 c2577128 编写于 作者: P Peter Crosthwaite 提交者: Peter Maydell

arm/xilinx_zynq: Implement CBAR initialisation

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: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
Message-id: 8db7d57ebe5418fed397fcc86ea719f98446c178.1387160489.git.peter.crosthwaite@xilinx.com
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 d8bbdcf8
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
#define IRQ_OFFSET 32 /* pic interrupts start from index 32 */ #define IRQ_OFFSET 32 /* pic interrupts start from index 32 */
#define MPCORE_PERIPHBASE 0xF8F00000
static const int dma_irqs[8] = { static const int dma_irqs[8] = {
46, 47, 48, 49, 72, 73, 74, 75 46, 47, 48, 49, 72, 73, 74, 75
}; };
...@@ -122,6 +124,11 @@ static void zynq_init(QEMUMachineInitArgs *args) ...@@ -122,6 +124,11 @@ static void zynq_init(QEMUMachineInitArgs *args)
cpu = ARM_CPU(object_new(object_class_get_name(cpu_oc))); 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); object_property_set_bool(OBJECT(cpu), true, "realized", &err);
if (err) { if (err) {
error_report("%s", error_get_pretty(err)); error_report("%s", error_get_pretty(err));
...@@ -160,7 +167,7 @@ static void zynq_init(QEMUMachineInitArgs *args) ...@@ -160,7 +167,7 @@ static void zynq_init(QEMUMachineInitArgs *args)
qdev_prop_set_uint32(dev, "num-cpu", 1); qdev_prop_set_uint32(dev, "num-cpu", 1);
qdev_init_nofail(dev); qdev_init_nofail(dev);
busdev = SYS_BUS_DEVICE(dev); busdev = SYS_BUS_DEVICE(dev);
sysbus_mmio_map(busdev, 0, 0xF8F00000); sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE);
sysbus_connect_irq(busdev, 0, sysbus_connect_irq(busdev, 0,
qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ)); qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册