[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH target-arm v5 05/10] arm/highbank: Fix CBAR initiali
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PATCH target-arm v5 05/10] arm/highbank: Fix CBAR initialisation |
Date: |
Sun, 15 Dec 2013 18:31:03 -0800 |
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
[<c0015164>] (unwind_backtrace) from [<c00118c0>] (show_stack+0x10/0x14)
[<c00118c0>] (show_stack) from [<c02bd5fc>] (dump_stack+0x78/0x90)
[<c02bd5fc>] (dump_stack) from [<c001f110>] (warn_slowpath_common+0x68/0x84)
[<c001f110>] (warn_slowpath_common) from [<c001f1f4>]
(warn_slowpath_null+0x1c/0x24)
[<c001f1f4>] (warn_slowpath_null) from [<c0017c6c>]
(__arm_ioremap_pfn_caller+0x180/0x198)
[<c0017c6c>] (__arm_ioremap_pfn_caller) from [<c0017cd8>]
(__arm_ioremap_caller+0x54/0x5c)
[<c0017cd8>] (__arm_ioremap_caller) from [<c0017d10>] (__arm_ioremap+0x18/0x1c)
[<c0017d10>] (__arm_ioremap) from [<c03913c0>] (highbank_init_irq+0x34/0x8c)
[<c03913c0>] (highbank_init_irq) from [<c038c228>] (init_IRQ+0x28/0x2c)
[<c038c228>] (init_IRQ) from [<c03899ec>] (start_kernel+0x234/0x398)
[<c03899ec>] (start_kernel) from [<00008074>] (0x8074)
---[ end trace 3406ff24bd97382f ]---
Which disappears with this patch.
Signed-off-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
changed since v2:
Fix msg typos
changed since v1:
use error report rather than fprintf(stderr
hw/arm/highbank.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index 1d19d8f..cb32325 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);
}
--
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 <=
- [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, 2013/12/15
- [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