aboutsummaryrefslogtreecommitdiff
path: root/src/arch/arm/armv7/exception.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2014-10-16 10:23:36 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-08 09:28:37 +0200
commitb2b7132fa3bfcdc8fcdb482e528d8f0be6c22556 (patch)
tree7ac16905826e16d74d8f04bcb4db02fce54f827f /src/arch/arm/armv7/exception.c
parent0de8820f5f94b307f0fe22e5e01c94e573f5c5ee (diff)
arm: Dump additional fault registers in abort handlers
Paging code is tricky and figuring out what is wrong with it can be a pain. This patch tries to ease the burden by giving a little more information for prefetch and data aborts, dumping the Instruction Fault Address Register (IFAR), Instruction Fault Status Register (IFSR) and Auxiliary Instruction Fault Status Register (AIFSR) or the respective Data registers. These contain additional information about the cause of the abort (internal/external, write or read, fault subtype, etc.) and the faulting address. BUG=None TEST=I have read through enough imprecise asynchronous external abort reports with this patch that I learned the bit pattern by heart. Change-Id: If1850c4a6df29b1195714ed0bdf025e51220e8ab Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: bf3b4924121825a5ceef7e5c14b7b307d01f8e9c Original-Change-Id: I56a0557d4257f40b5b30c559c84eaf9b9f729099 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/223784 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9345 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/arm/armv7/exception.c')
-rw-r--r--src/arch/arm/armv7/exception.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/arm/armv7/exception.c b/src/arch/arm/armv7/exception.c
index eedd47d1d5..4fac0bcd3c 100644
--- a/src/arch/arm/armv7/exception.c
+++ b/src/arch/arm/armv7/exception.c
@@ -100,6 +100,9 @@ void exception_prefetch_abort(uint32_t *regs)
printk(BIOS_ERR, "exception _prefetch_abort\n");
regs[15] -= 4;
print_regs(regs);
+ printk(BIOS_ERR, "IFAR = %#.8x\n", read_ifar());
+ printk(BIOS_ERR, "IFSR = %#.8x\n", read_ifsr());
+ printk(BIOS_ERR, "AIFSR = %#.8x\n", read_aifsr());
dump_stack(regs[13], 512);
die("exception");
}
@@ -109,6 +112,9 @@ void exception_data_abort(uint32_t *regs)
printk(BIOS_ERR, "exception _data_abort\n");
regs[15] -= 8;
print_regs(regs);
+ printk(BIOS_ERR, "DFAR = %#.8x\n", read_dfar());
+ printk(BIOS_ERR, "DFSR = %#.8x\n", read_dfsr());
+ printk(BIOS_ERR, "ADFSR = %#.8x\n", read_adfsr());
dump_stack(regs[13], 512);
die("exception");
}