[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen: arm64: more useful logging on bad trap.
commit 2a9204bf9c0aaadf64434e8b45da9bb5a1784ee1 Author: Ian Campbell <ian.campbell@xxxxxxxxxx> AuthorDate: Wed Feb 18 17:01:55 2015 +0000 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Feb 19 16:48:52 2015 +0000 xen: arm64: more useful logging on bad trap. Dump the register state before panicing so we have some clue where the issue occurred. Also decode the ESR register a bit to save having to grab a pen and paper. ESR_EL2 is a 32-bit register, so use SYSREG_READ32 not ..._READ64, as we already do correctly in the main trap handler. While here notice that do_trap_serror is never called and remove it. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Reviewed-by: Julien Grall <julien.grall@xxxxxxxxxx> Tested-by: Jintack Lim <jintack@xxxxxxxxxxxxxxx> Cc: jintack@xxxxxxxxxxxxxxx [ ijc -- add missing \n to first printk ] --- xen/arch/arm/arm64/traps.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/arm64/traps.c b/xen/arch/arm/arm64/traps.c index 1693b5d..5a90cfa 100644 --- a/xen/arch/arm/arm64/traps.c +++ b/xen/arch/arm/arm64/traps.c @@ -24,11 +24,6 @@ #include <public/xen.h> -asmlinkage void do_trap_serror(struct cpu_user_regs *regs) -{ - panic("Unhandled serror trap"); -} - static const char *handler[]= { "Synchronous Abort", "IRQ", @@ -38,11 +33,14 @@ static const char *handler[]= { asmlinkage void do_bad_mode(struct cpu_user_regs *regs, int reason) { - uint64_t esr = READ_SYSREG64(ESR_EL2); - printk("Bad mode in %s handler detected, code 0x%08"PRIx64"\n", - handler[reason], esr); + union hsr hsr = { .bits = READ_SYSREG32(ESR_EL2) }; + + printk("Bad mode in %s handler detected\n", handler[reason]); + printk("ESR=0x%08"PRIx32": EC=%"PRIx32", IL=%"PRIx32", ISS=%"PRIx32"\n", + hsr.bits, hsr.ec, hsr.len, hsr.iss); local_irq_disable(); + show_execution_state(regs); panic("bad mode"); } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |