From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH RFC 8/8] xen/arm: Some early trap logging Date: Fri, 13 Sep 2013 14:26:47 +0100 Message-ID: <52331297.8010800@linaro.org> References: <1378822681.10928.8.camel@kazak.uk.xensource.com> <1378822705-19310-8-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1378822705-19310-8-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Josh Zhao , stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 09/10/2013 03:18 PM, Ian Campbell wrote: > Not for really for application, might be useful to someone? I think it could be useful for early debugging on new platform or until init_traps initialized the correct handlers. Can you update this patch with more information about the trap (reset, undefined, ...)? > > Signed-off-by: Ian Campbell > --- > xen/arch/arm/arm32/head.S | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S > index 79e95b6..06d53ad 100644 > --- a/xen/arch/arm/arm32/head.S > +++ b/xen/arch/arm/arm32/head.S > @@ -366,6 +366,9 @@ paging: > bne 1b > > launch: > + adr r0, early_trap_vector > + mcr CP32(r0, VBAR_EL2) > + > ldr r0, =init_stack /* Find the boot-time stack */ > ldr sp, [r0] > add sp, #STACK_SIZE /* (which grows down from the top). */ > @@ -376,12 +379,24 @@ launch: > beq start_xen /* and disappear into the land of C */ > b start_secondary /* (to the appropriate entry point) */ > > +trap_early: > + PRINT("\r\nEARLY TRAP\r\n") > /* Fail-stop > * r0: string explaining why */ > fail: PRINT("- Boot failed -\r\n") > 1: wfe > b 1b > > + .align 5 > +early_trap_vector: > + .word 0 /* 0x00 - Reset */ > + b trap_early /* 0x04 - Undefined Instruction */ > + b trap_early /* 0x08 - Supervisor Call */ > + b trap_early /* 0x0c - Prefetch Abort */ > + b trap_early /* 0x10 - Data Abort */ > + b trap_early /* 0x14 - Hypervisor */ > + b trap_early /* 0x18 - IRQ */ > + b trap_early /* 0x1c - FIQ */ > > #ifdef EARLY_PRINTK > /* Bring up the UART. > -- Julien Grall