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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291577
@ -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 |
|
if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK |
|
||||||
WARN_GIANTOK, NULL, "Kernel page fault") != 0) {
|
WARN_GIANTOK, NULL, "Kernel page fault") != 0) {
|
||||||
print_registers(frame);
|
print_registers(frame);
|
||||||
|
printf(" far: %16lx\n", far);
|
||||||
|
printf(" esr: %.8lx\n", esr);
|
||||||
panic("data abort in critical section or under mutex");
|
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;
|
frame->tf_elr = pcb->pcb_onfault;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("Fatal data abort:\n");
|
||||||
|
print_registers(frame);
|
||||||
|
printf(" far: %16lx\n", far);
|
||||||
|
printf(" esr: %.8lx\n", esr);
|
||||||
|
|
||||||
#ifdef KDB
|
#ifdef KDB
|
||||||
if (debugger_on_panic || kdb_active)
|
if (debugger_on_panic || kdb_active)
|
||||||
if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame))
|
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_FP_SIMD:
|
||||||
case EXCP_TRAP_FP:
|
case EXCP_TRAP_FP:
|
||||||
print_registers(frame);
|
print_registers(frame);
|
||||||
|
printf(" esr: %.8lx\n", esr);
|
||||||
panic("VFP exception in the kernel");
|
panic("VFP exception in the kernel");
|
||||||
case EXCP_DATA_ABORT:
|
case EXCP_DATA_ABORT:
|
||||||
far = READ_SPECIALREG(far_el1);
|
far = READ_SPECIALREG(far_el1);
|
||||||
|
Loading…
Reference in New Issue
Block a user