diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-14 11:05:38 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-29 08:16:41 +0200 |
commit | 726f3e2403f0cd30a5c5fc7bdb84ac6c1e18cbc2 (patch) | |
tree | 125504934f4f9474362d9394a90fe7608e72e8c8 /arch | |
parent | 745452704ae073df82fc2c4f7a031d1d1ec78bf0 (diff) | |
download | barebox-726f3e2403f0cd30a5c5fc7bdb84ac6c1e18cbc2.tar.gz barebox-726f3e2403f0cd30a5c5fc7bdb84ac6c1e18cbc2.tar.xz |
ARM: aarch64: print more information on sync exception
On a sync exception more useful information can be printed than we
currently do. Pass the ESR and FAR value to do_sync and print the
reason for the exception along with the address that actually faulted.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/exceptions_64.S | 4 | ||||
-rw-r--r-- | arch/arm/cpu/interrupts_64.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/cpu/exceptions_64.S b/arch/arm/cpu/exceptions_64.S index 58ca50b709..22034eaef9 100644 --- a/arch/arm/cpu/exceptions_64.S +++ b/arch/arm/cpu/exceptions_64.S @@ -35,12 +35,15 @@ switch_el x11, 3f, 2f, 1f 3: mrs x1, esr_el3 mrs x2, elr_el3 + mrs x3, far_el3 b 0f 2: mrs x1, esr_el2 mrs x2, elr_el2 + mrs x3, far_el2 b 0f 1: mrs x1, esr_el1 mrs x2, elr_el1 + mrs x3, far_el1 0: stp x2, x0, [sp, #-16]! mov x0, sp @@ -99,6 +102,7 @@ _do_bad_error: _do_sync: exception_entry + mov x2, x3 bl do_sync b exception_exit diff --git a/arch/arm/cpu/interrupts_64.c b/arch/arm/cpu/interrupts_64.c index c32cd4f051..ee3dc3380b 100644 --- a/arch/arm/cpu/interrupts_64.c +++ b/arch/arm/cpu/interrupts_64.c @@ -143,9 +143,9 @@ void do_bad_error(struct pt_regs *pt_regs) do_exception(pt_regs); } -void do_sync(struct pt_regs *pt_regs) +void do_sync(struct pt_regs *pt_regs, unsigned int esr, unsigned long far) { - printf("sync exception\n"); + printf("%s exception at 0x%016lx\n", esr_get_class_string(esr), far); do_exception(pt_regs); } |