Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/arm/trap-v4.c
Show First 20 Lines • Show All 398 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* Note: If 'l' is NULL, we assume we're dealing with a prefetch abort. | * Note: If 'l' is NULL, we assume we're dealing with a prefetch abort. | ||||
*/ | */ | ||||
static int | static int | ||||
dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct thread *td, | dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct thread *td, | ||||
struct ksig *ksig) | struct ksig *ksig) | ||||
{ | { | ||||
const char *mode; | const char *mode; | ||||
#ifdef KDB | |||||
bool handled; | |||||
#endif | |||||
#ifdef KDB | |||||
if (kdb_active) { | |||||
kdb_reenter(); | |||||
return (0); | |||||
} | |||||
#endif | |||||
#ifdef KDTRACE_HOOKS | #ifdef KDTRACE_HOOKS | ||||
if (!TRAP_USERMODE(tf)) { | if (!TRAP_USERMODE(tf)) { | ||||
if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf, far & FAULT_TYPE_MASK)) | if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf, far & FAULT_TYPE_MASK)) | ||||
return (0); | return (0); | ||||
} | } | ||||
#endif | #endif | ||||
mode = TRAP_USERMODE(tf) ? "user" : "kernel"; | mode = TRAP_USERMODE(tf) ? "user" : "kernel"; | ||||
Show All 26 Lines | if (TRAP_USERMODE(tf)) | ||||
printf("usp=%08x, ulr=%08x", | printf("usp=%08x, ulr=%08x", | ||||
tf->tf_usr_sp, tf->tf_usr_lr); | tf->tf_usr_sp, tf->tf_usr_lr); | ||||
else | else | ||||
printf("ssp=%08x, slr=%08x", | printf("ssp=%08x, slr=%08x", | ||||
tf->tf_svc_sp, tf->tf_svc_lr); | tf->tf_svc_sp, tf->tf_svc_lr); | ||||
printf(", pc =%08x\n\n", tf->tf_pc); | printf(", pc =%08x\n\n", tf->tf_pc); | ||||
#ifdef KDB | #ifdef KDB | ||||
if (debugger_on_panic || kdb_active) | if (debugger_on_panic) { | ||||
if (kdb_trap(fsr, 0, tf)) | kdb_why = KDB_WHY_TRAP; | ||||
handled = kdb_trap(fsr, 0, tf); | |||||
kdb_why = KDB_WHY_UNSET; | |||||
if (handled) | |||||
return (0); | return (0); | ||||
} | |||||
#endif | #endif | ||||
panic("Fatal abort"); | panic("Fatal abort"); | ||||
/*NOTREACHED*/ | /*NOTREACHED*/ | ||||
} | } | ||||
/* | /* | ||||
* dab_align() handles the following data aborts: | * dab_align() handles the following data aborts: | ||||
* | * | ||||
▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines |