[PATCH 0/5] arm64: stack backtraces
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Thu Jul 3 07:19:46 CEST 2025
On RISC-V we already can show backtraces if CONFIG_FRAMEPOINTER=y or
CONFIG_SPL_FRAMEPOINTER=y. Extend this functionality to arm64.
Show all 64 bits of the exception syndrom register esr.
Here is an example output:
=> exception undefined
"Synchronous Abort" handler, esr 0x0000000002000000
elr: 000000000002c258 lr : 000000000003967c (reloc)
elr: 000000007f6c8258 lr : 000000007f6d567c
x0 : 000000007f7c0200 x1 : 0000000000000000
x2 : 0000000000000001 x3 : 000000007e662988
x4 : 000000007f6c8258 x5 : 000000007e6629c0
x6 : 0000000000000064 x7 : 0000000000000000
x8 : 00000000ffffffd8 x9 : 6db6db6db6db6db7
x10: 000000000000000d x11: 0000000000000006
x12: 000000007e558ef8 x13: 000000007e55bdc0
x14: 0000000000000000 x15: 000000007e558aac
x16: 000000007f6c8258 x17: 0000000000000000
x18: 000000007e65bdc0 x19: 000000007f7c0200
x20: 0000000000000000 x21: 0000000000000000
x22: 000000007e662980 x23: 0000000000000002
x24: 000000007f7d5304 x25: 0000000000000000
x26: 0000000000000000 x27: 000000007e6629e0
x28: 000000007e662980 x29: 000000007e558d80
Code: 97ffff63 a94153f3 a8c37bfd d65f03c0 (00001234)
backtrace:
0: fp: 000000007e558d80 lr: 000000007f6cad20 - 000000000002ed20 (reloc)
1: fp: 000000007e558de0 lr: 000000007f6caeac - 000000000002eeac (reloc)
2: fp: 000000007e558e90 lr: 000000007f6cb3f0 - 000000000002f3f0 (reloc)
3: fp: 000000007e558f50 lr: 000000007f6d4af8 - 0000000000038af8 (reloc)
4: fp: 000000007e558f80 lr: 000000007f6c847c - 000000000002c47c (reloc)
5: fp: 000000007e558f90 lr: 000000007f6cc028 - 0000000000030028 (reloc)
6: fp: 000000007e558fb0 lr: 000000007f69f010 - 0000000000003010 (reloc)
Resetting CPU ...
resetting ...
Heinrich Schuchardt (5):
cmd/exception: missing include string.h
arm64: initialize the frame pointer register
arm64: implement printing backtraces
Kconfig: make CONFIG_FRAMEPOINTER available on arm64
arm64: simplify interrupt code
Kconfig | 25 ++++++++++
arch/arm/Makefile | 9 +++-
arch/arm/lib/crt0_64.S | 1 +
arch/arm/lib/interrupts_64.c | 94 ++++++++++++++++++++++--------------
arch/riscv/Kconfig | 21 --------
include/exception.h | 1 +
6 files changed, 93 insertions(+), 58 deletions(-)
--
2.48.1
More information about the U-Boot
mailing list