From: Ian Campbell Subject: Re: [PATCH 6/7] xen/arm: Support dtb /memreserve/ regions Date: Thu, 12 Sep 2013 14:47:14 +0100 Message-ID: <1378993634.10076.57.camel@kazak.uk.xensource.com> References: <1378989755.10076.53.camel@kazak.uk.xensource.com> <1378989775-28294-6-git-send-email-ian.campbell@citrix.com> <5231BB92.3090508@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5231BB92.3090508@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, andre.przywara@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2013-09-12 at 14:03 +0100, Julien Grall wrote: > On 09/12/2013 01:42 PM, Ian Campbell wrote: > > This requires a mapping of the DTB during setup_mm. Previosly this was in the > > BOOT_MISC slot, which is clobbered by setup_pagetables. Split it out into its > > own slot which can be preserved. > > > > Also handle this regions are part of consider_modules() and next_modules() to > > ensure we do not locate any part of Xen or the heaps over them. > > > > Signed-off-by: Ian Campbell > > --- > > xen/arch/arm/arm32/head.S | 2 +- > > xen/arch/arm/arm32/traps.c | 3 +++ > > xen/arch/arm/arm64/head.S | 2 +- > > xen/arch/arm/mm.c | 10 +++++++- > > xen/arch/arm/setup.c | 58 ++++++++++++++++++++++++++++++++++++++++-- > > xen/arch/arm/traps.c | 3 ++- > > xen/common/device_tree.c | 13 +++++++++- > > xen/include/asm-arm/config.h | 7 ++--- > > xen/include/asm-arm/mm.h | 2 ++ > > 9 files changed, 90 insertions(+), 10 deletions(-) > > > > diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S > > index 79e95b6..5072e2a 100644 > > --- a/xen/arch/arm/arm32/head.S > > +++ b/xen/arch/arm/arm32/head.S > > @@ -301,7 +301,7 @@ cpu_init_done: > > orr r2, r2, #PT_UPPER(MEM) > > orr r2, r2, #PT_LOWER(MEM) /* r2:r3 := 2MB RAM incl. DTB */ > > add r4, r4, #8 > > - strd r2, r3, [r1, r4] /* Map it in the early boot slot */ > > + strd r2, r3, [r1, r4] /* Map it in the early fdt slot */ > > > > pt_ready: > > PRINT("- Turning on paging -\r\n") > > diff --git a/xen/arch/arm/arm32/traps.c b/xen/arch/arm/arm32/traps.c > > index ff0b945..e8dd9f5 100644 > > --- a/xen/arch/arm/arm32/traps.c > > +++ b/xen/arch/arm/arm32/traps.c > > @@ -22,6 +22,7 @@ > > #include > > > > #include > > +#include > > > > asmlinkage void do_trap_undefined_instruction(struct cpu_user_regs *regs) > > { > > @@ -40,6 +41,8 @@ asmlinkage void do_trap_prefetch_abort(struct cpu_user_regs *regs) > > > > asmlinkage void do_trap_data_abort(struct cpu_user_regs *regs) > > { > > + early_printk("Data Abort at %"PRIvaddr" DFAR %"PRIx32"\n", > > + regs->pc, READ_CP32(DFAR)); > > early_printk belongs to __init and will be discarded by > free_init_memory. Any data abort after this call will result to a > "double" hang. Yeah, this was some debug code of mine which snuck in, not supposed to be here at all! > > > > void do_unexpected_trap(const char *msg, struct cpu_user_regs *regs) > > { > > - printk("CPU%d: Unexpected Trap: %s\n", smp_processor_id(), msg); > > + early_printk("CPU%d: Unexpected Trap: %s\n", smp_processor_id(), msg); > > Same issue as do data_abort_trap Yup!