diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-03-27 16:11:40 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-03-31 15:42:37 +1100 |
commit | 989d8b68b63ba21a58fb96cd0b0a82505e669046 (patch) | |
tree | 74388ed44bae1f00319108dba9aeed1927208242 /core/exceptions.c | |
parent | e162dbe49d12603ed9663a16f3040fbe6fddb9e9 (diff) | |
download | skiboot-989d8b68b63ba21a58fb96cd0b0a82505e669046.zip skiboot-989d8b68b63ba21a58fb96cd0b0a82505e669046.tar.gz skiboot-989d8b68b63ba21a58fb96cd0b0a82505e669046.tar.bz2 |
exceptions: Catch exceptions at boot time
And print some informations about GPR state, backtrace, etc...
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/exceptions.c')
-rw-r--r-- | core/exceptions.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/core/exceptions.c b/core/exceptions.c index 83efa36..8416190 100644 --- a/core/exceptions.c +++ b/core/exceptions.c @@ -28,18 +28,14 @@ static void dump_regs(struct stack_frame *stack) { unsigned int i; - printf("SRR0 : "REG" SRR1 : "REG"\n", stack->srr0, stack->srr1); - printf("HSRR0: "REG" HSRR1: "REG"\n", stack->srr0, stack->srr1); - printf("CFAR : "REG" LR : "REG" CTR: "REG"\n", - stack->cfar, stack->lr, stack->ctr); - printf(" CR: %08x XER: %08x\n", stack->cr, stack->xer); - - for (i = 0; i < 32; i++) { - if ((i % REGS_PER_LINE) == 0) - printf("\nGPR%02d: ", i); - printf(REG " ", stack->gpr[i]); - } - printf("\n"); + prerror("SRR0 : "REG" SRR1 : "REG"\n", stack->srr0, stack->srr1); + prerror("HSRR0: "REG" HSRR1: "REG"\n", stack->srr0, stack->srr1); + prerror("LR : "REG" CTR : "REG"\n", stack->lr, stack->ctr); + prerror("CFAR : "REG"\n", stack->cfar); + prerror("CR : %08x XER: %08x\n", stack->cr, stack->xer); + for (i = 0; i < 16; i++) + prerror("GPR%02d: "REG" GPR%02d: "REG"\n", + i, stack->gpr[i], i + 16, stack->gpr[i + 16]); } /* Called from head.S, thus no prototype */ @@ -47,9 +43,9 @@ void exception_entry(struct stack_frame *stack) __noreturn; void exception_entry(struct stack_frame *stack) { + prerror("***********************************************\n"); prerror("Unexpected exception %llx !\n", stack->type); dump_regs(stack); - backtrace(); _abort(); } |