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-08 11:32:45 +1000 |
commit | e8c3f4ce21c24eee58489149769e84315d4d647d (patch) | |
tree | c7a59f074fc91cb147b966eed2da7a4adf955864 /asm/head.S | |
parent | 341daa8104af3231b908e6fcffeedb5e47b33990 (diff) | |
download | skiboot-e8c3f4ce21c24eee58489149769e84315d4d647d.zip skiboot-e8c3f4ce21c24eee58489149769e84315d4d647d.tar.gz skiboot-e8c3f4ce21c24eee58489149769e84315d4d647d.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>
Diffstat (limited to 'asm/head.S')
-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) |