From c0f1ead985e024dd8d01bba650bc753083a2cc2a Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Tue, 17 Dec 2013 19:42:28 +0000 Subject: arm/highbank: Fix CBAR initialisation Fix the CBAR initialisation by using the newly defined static property. CBAR is now set before realization, so the intended value is now actually used. So I have kind of tested this. I booted an ARM kernel on Highbank with the stock Highbank DTB. It doesn't boot (and I will be doing something wrong), but before this patch I got this: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at /workspaces/pcrost/public/linux2.git/arch/arm/mm/ioremap.c:301 __arm_ioremap_pfn_caller+0x180/0x198() CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.13.0-rc1-next-20131126-dirty #2 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x78/0x90) [] (dump_stack) from [] (warn_slowpath_common+0x68/0x84) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) [] (warn_slowpath_null) from [] (__arm_ioremap_pfn_caller+0x180/0x198) [] (__arm_ioremap_pfn_caller) from [] (__arm_ioremap_caller+0x54/0x5c) [] (__arm_ioremap_caller) from [] (__arm_ioremap+0x18/0x1c) [] (__arm_ioremap) from [] (highbank_init_irq+0x34/0x8c) [] (highbank_init_irq) from [] (init_IRQ+0x28/0x2c) [] (init_IRQ) from [] (start_kernel+0x234/0x398) [] (start_kernel) from [<00008074>] (0x8074) ---[ end trace 3406ff24bd97382f ]--- Which disappears with this patch. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell Message-id: fedec366aaa512d75093635f523d1dbcb3358361.1387160489.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell --- hw/arm/highbank.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'hw/arm') diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index 1d19d8f25e..cb32325082 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -236,14 +236,16 @@ static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine) cpu = ARM_CPU(object_new(object_class_get_name(oc))); + object_property_set_int(OBJECT(cpu), GIC_BASE_ADDR, "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)); exit(1); } - - /* This will become a QOM property eventually */ - cpu->reset_cbar = GIC_BASE_ADDR; cpu_irq[n] = qdev_get_gpio_in(DEVICE(cpu), ARM_CPU_IRQ); } -- cgit v1.2.1