diff options
author | Michael Neuling <mikey@neuling.org> | 2016-08-02 16:46:50 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-08-09 10:12:30 +1000 |
commit | 895f5e8a3a4416a523c21b9873885c7f19e92a09 (patch) | |
tree | 238fcd833f5778529c58797dba7e236ec63f8cd7 | |
parent | 7aabae24785e08105bcd222b1a135380c667e4d3 (diff) | |
download | skiboot-895f5e8a3a4416a523c21b9873885c7f19e92a09.zip skiboot-895f5e8a3a4416a523c21b9873885c7f19e92a09.tar.gz skiboot-895f5e8a3a4416a523c21b9873885c7f19e92a09.tar.bz2 |
asm: Fix backtrace for unexpected exception
If we take an unknown exception at boot time we attempt to put the
exception vector in the back trace, The result looks like this (when
we take an 0x700):
S: 0000000031e838a0 R: 000000003001365c .backtrace+0x38
S: 0000000031e83930 R: 00000000300186cc ._abort+0x4c
S: 0000000031e839b0 R: 0000000030023a78 .exception_entry+0x114
S: 0000000031e83a40 R: 0000000000001f04 * +0x1f04
S: 0000000031e83c10 R: 0000000000000700 * +0x700
S: 0000000031e83e30 R: 0000000030014444 .main_cpu_entry+0x444
S: 0000000031e83f00 R: 000000003000259c boot_entry+0x19c
We overwrite link address in the current stack frame with the
exception vector (ie. 0x700 in the above example). Unfortunately this
overrides the location that caused the exception, which is much more
useful information in debugging the problem.
This patch removes the writing link register in the current stack
frame, so the back trace now looks like this:
S: 0000000031da38a0 R: 000000003001365c .backtrace+0x38
S: 0000000031da3930 R: 00000000300186cc ._abort+0x4c
S: 0000000031da39b0 R: 0000000030023a78 .exception_entry+0x114
S: 0000000031da3a40 R: 0000000000001f00 * +0x1f00
S: 0000000031da3c10 R: 00000000300323f8 .psi_init+0x1f4
S: 0000000031da3e30 R: 0000000030014444 .main_cpu_entry+0x444
S: 0000000031da3f00 R: 000000003000259c boot_entry+0x19c
This loses the exception vector from the back trace, but this
information is already available in the exception dump just above it
Suggestion by benh.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
(cherry picked from commit e8c3f4ce21c24eee58489149769e84315d4d647d)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | asm/head.S | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -150,7 +150,6 @@ hir_trigger: .= 0x1e00 _exception: - std %r4,16(%r1) stdu %r1,-STACK_FRAMESIZE(%r1) std %r3,STACK_CFAR(%r1) std %r4,STACK_TYPE(%r1) |