diff options
author | Denis Orlov <denorl2009@gmail.com> | 2023-07-25 08:05:08 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-07-27 07:08:29 +0200 |
commit | 2c9e141c078fea0c200936e90b8fff29c5a384e7 (patch) | |
tree | 0ec7f8d143bc243eaef9455003400869086bb188 /arch/mips/lib/traps.c | |
parent | 7141578b3d85e6c74331d7bc714033e0a987b2e9 (diff) | |
download | barebox-2c9e141c078fea0c200936e90b8fff29c5a384e7.tar.gz barebox-2c9e141c078fea0c200936e90b8fff29c5a384e7.tar.xz |
MIPS: print BadVAddr CP0 register on exception
This register contains the failing address on Address Error and some
TLB-related exceptions, and is useful for debugging purposes.
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
Link: https://lore.barebox.org/20230725050618.3451-8-denorl2009@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/lib/traps.c')
-rw-r--r-- | arch/mips/lib/traps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/lib/traps.c b/arch/mips/lib/traps.c index 45694fe7ef..638a511fee 100644 --- a/arch/mips/lib/traps.c +++ b/arch/mips/lib/traps.c @@ -153,7 +153,8 @@ static void show_regs(const struct pt_regs *regs) printf("Status: %08x\n", (uint32_t)regs->cp0_status); printf("Cause : %08x\n", (uint32_t)regs->cp0_cause); - printf("Config: %08x\n\n", read_c0_config()); + printf("Config: %08x\n", read_c0_config()); + printf("BadVA : %0*lx\n\n", field, regs->cp0_badvaddr); } void barebox_exc_handler(struct pt_regs *regs) |