Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/arm64/trap.c
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, | ||||
uint64_t far, int lower) | uint64_t far, int lower) | ||||
{ | { | ||||
struct vm_map *map; | struct vm_map *map; | ||||
struct proc *p; | struct proc *p; | ||||
struct pcb *pcb; | struct pcb *pcb; | ||||
vm_prot_t ftype; | vm_prot_t ftype; | ||||
vm_offset_t va; | vm_offset_t va; | ||||
int error, sig, ucode; | int error, sig, ucode; | ||||
#ifdef KDB | |||||
bool handled; | |||||
#endif | |||||
/* | /* | ||||
* According to the ARMv8-A rev. A.g, B2.10.5 "Load-Exclusive | * According to the ARMv8-A rev. A.g, B2.10.5 "Load-Exclusive | ||||
* and Store-Exclusive instruction usage restrictions", state | * and Store-Exclusive instruction usage restrictions", state | ||||
* of the exclusive monitors after data abort exception is unknown. | * of the exclusive monitors after data abort exception is unknown. | ||||
*/ | */ | ||||
clrex(); | clrex(); | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | if (lower) { | ||||
} | } | ||||
printf("Fatal data abort:\n"); | printf("Fatal data abort:\n"); | ||||
print_registers(frame); | print_registers(frame); | ||||
printf(" far: %16lx\n", far); | printf(" far: %16lx\n", far); | ||||
printf(" esr: %.8lx\n", esr); | printf(" esr: %.8lx\n", esr); | ||||
#ifdef KDB | #ifdef KDB | ||||
if (debugger_on_panic || kdb_active) | if (debugger_on_panic) { | ||||
if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame)) | kdb_why = KDB_WHY_TRAP; | ||||
handled = kdb_trap(ESR_ELx_EXCEPTION(esr), 0, | |||||
frame); | |||||
kdb_why = KDB_WHY_UNSET; | |||||
if (handled) | |||||
return; | return; | ||||
} | |||||
#endif | #endif | ||||
panic("vm_fault failed: %lx", frame->tf_elr); | panic("vm_fault failed: %lx", frame->tf_elr); | ||||
} | } | ||||
} | } | ||||
if (lower) | if (lower) | ||||
userret(td, frame); | userret(td, frame); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines |