diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 1db574273bd0..ea932edca8f6 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -313,13 +313,11 @@ do_el1h_sync(struct trapframe *frame) * instruction results in an exception with an unknown reason. */ static void -el0_excp_unknown(struct trapframe *frame) +el0_excp_unknown(struct trapframe *frame, uint64_t far) { struct thread *td; - uint64_t far; td = curthread; - far = READ_SPECIALREG(far_el1); call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)far); userret(td, frame); } @@ -342,6 +340,7 @@ do_el0_sync(struct trapframe *frame) esr = READ_SPECIALREG(esr_el1); exception = ESR_ELx_EXCEPTION(esr); switch (exception) { + case EXCP_UNKNOWN: case EXCP_INSN_ABORT_L: case EXCP_DATA_ABORT_L: case EXCP_DATA_ABORT: @@ -371,7 +370,7 @@ do_el0_sync(struct trapframe *frame) data_abort(frame, esr, far, 1); break; case EXCP_UNKNOWN: - el0_excp_unknown(frame); + el0_excp_unknown(frame, far); break; case EXCP_SP_ALIGN: call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_sp);