From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH RFC 8/8] xen/arm: Some early trap logging Date: Tue, 10 Sep 2013 15:18:25 +0100 Message-ID: <1378822705-19310-8-git-send-email-ian.campbell@citrix.com> References: <1378822681.10928.8.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1378822681.10928.8.camel@kazak.uk.xensource.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: xen-devel@lists.xen.org Cc: Josh Zhao , julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Not for really for application, might be useful to someone? 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. -- 1.7.10.4