Print useful debug data on unhandled kernel fault on arm64
When panicing because of an unhandled data abort from the kernel it is useful to know the register state and faulting address to aid debugging. Print these registers before calling panic. Sponsored by: DARPA, AFRL
This commit is contained in:
parent
5482a678aa
commit
9bf9b8b93a
@ -357,12 +357,15 @@ do_el1h_sync(struct thread *td, struct trapframe *frame)
|
||||
far = READ_SPECIALREG(far_el1);
|
||||
dfsc = esr & ISS_DATA_DFSC_MASK;
|
||||
if (dfsc < nitems(abort_handlers) &&
|
||||
abort_handlers[dfsc] != NULL)
|
||||
abort_handlers[dfsc] != NULL) {
|
||||
abort_handlers[dfsc](td, frame, esr, far, 0);
|
||||
else
|
||||
} else {
|
||||
print_registers(frame);
|
||||
printf(" far: %16lx\n", far);
|
||||
panic("Unhandled EL1 %s abort: %x",
|
||||
exception == EXCP_INSN_ABORT ? "instruction" :
|
||||
"data", dfsc);
|
||||
}
|
||||
break;
|
||||
case EXCP_BRK:
|
||||
#ifdef KDTRACE_HOOKS
|
||||
|
Loading…
Reference in New Issue
Block a user