Print useful information when we hit a data abort we can't handle. This
prints the trap frame, along with the exception syndrome and fault address registers. Even though esr is 64-bits here it is only 32-bits in hardware so only print the valid 32-bits. While here also print esr and far when appropriate after printing the trap frame. Sponsored by: ABT Systems Ltd
This commit is contained in:
parent
99a1570a25
commit
1e888d7870
@ -186,6 +186,8 @@ data_abort(struct trapframe *frame, uint64_t esr, uint64_t far, int lower)
|
||||
if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK |
|
||||
WARN_GIANTOK, NULL, "Kernel page fault") != 0) {
|
||||
print_registers(frame);
|
||||
printf(" far: %16lx\n", far);
|
||||
printf(" esr: %.8lx\n", esr);
|
||||
panic("data abort in critical section or under mutex");
|
||||
}
|
||||
|
||||
@ -220,6 +222,12 @@ data_abort(struct trapframe *frame, uint64_t esr, uint64_t far, int lower)
|
||||
frame->tf_elr = pcb->pcb_onfault;
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Fatal data abort:\n");
|
||||
print_registers(frame);
|
||||
printf(" far: %16lx\n", far);
|
||||
printf(" esr: %.8lx\n", esr);
|
||||
|
||||
#ifdef KDB
|
||||
if (debugger_on_panic || kdb_active)
|
||||
if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame))
|
||||
@ -271,6 +279,7 @@ do_el1h_sync(struct trapframe *frame)
|
||||
case EXCP_FP_SIMD:
|
||||
case EXCP_TRAP_FP:
|
||||
print_registers(frame);
|
||||
printf(" esr: %.8lx\n", esr);
|
||||
panic("VFP exception in the kernel");
|
||||
case EXCP_DATA_ABORT:
|
||||
far = READ_SPECIALREG(far_el1);
|
||||
|
Loading…
Reference in New Issue
Block a user