[Skiboot] [PATCH] asm: Fix backtrace for unexpected exception

Balbir Singh bsingharora at gmail.com
Tue Aug 2 22:09:23 AEST 2016


On Tue, 2016-08-02 at 16:46 +1000, Michael Neuling wrote:
> 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 at neuling.org>
> ---

Acked-by: Balbir Singh <bsingharora at gmail.com>


More information about the Skiboot mailing list