aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/arm64/trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm64/arm64/trap.c')
-rw-r--r--sys/arm64/arm64/trap.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
index 9391e8ee0698..4e5f9e32b804 100644
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -170,8 +170,12 @@ static void
align_abort(struct thread *td, struct trapframe *frame, uint64_t esr,
uint64_t far, int lower)
{
- if (!lower)
+ if (!lower) {
+ print_registers(frame);
+ printf(" far: %16lx\n", far);
+ printf(" esr: %.8lx\n", esr);
panic("Misaligned access from kernel space!");
+ }
call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr);
userret(td, frame);
@@ -361,6 +365,7 @@ do_el1h_sync(struct thread *td, struct trapframe *frame)
} else {
print_registers(frame);
printf(" far: %16lx\n", far);
+ printf(" esr: %.8lx\n", esr);
panic("Unhandled EL1 %s abort: %x",
exception == EXCP_INSN_ABORT ? "instruction" :
"data", dfsc);
@@ -397,6 +402,7 @@ do_el1h_sync(struct thread *td, struct trapframe *frame)
/* FALLTHROUGH */
default:
print_registers(frame);
+ printf(" far: %16lx\n", READ_SPECIALREG(far_el1));
panic("Unknown kernel exception %x esr_el1 %lx\n", exception,
esr);
}
@@ -466,10 +472,14 @@ do_el0_sync(struct thread *td, struct trapframe *frame)
if (dfsc < nitems(abort_handlers) &&
abort_handlers[dfsc] != NULL)
abort_handlers[dfsc](td, frame, esr, far, 1);
- else
+ else {
+ print_registers(frame);
+ printf(" far: %16lx\n", far);
+ printf(" esr: %.8lx\n", esr);
panic("Unhandled EL0 %s abort: %x",
exception == EXCP_INSN_ABORT_L ? "instruction" :
"data", dfsc);
+ }
break;
case EXCP_UNKNOWN:
if (!undef_insn(0, frame))