i386: print all GPRs, PSL, and CR3 on double fault
Also compactify the printfs, and remove comment about 'two prints'. Their arguments are on same page, so one fault implies another. Reviewed by: jhb Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36302
This commit is contained in:
parent
54e1546e09
commit
0f906b30e6
@ -988,18 +988,26 @@ trap_user_dtrace(struct trapframe *frame, int (**hookp)(struct trapframe *))
|
||||
void
|
||||
dblfault_handler(void)
|
||||
{
|
||||
struct i386tss *t;
|
||||
|
||||
#ifdef KDTRACE_HOOKS
|
||||
if (dtrace_doubletrap_func != NULL)
|
||||
(*dtrace_doubletrap_func)();
|
||||
#endif
|
||||
printf("\nFatal double fault:\n");
|
||||
printf("eip = 0x%x\n", PCPU_GET(common_tssp)->tss_eip);
|
||||
printf("esp = 0x%x\n", PCPU_GET(common_tssp)->tss_esp);
|
||||
printf("ebp = 0x%x\n", PCPU_GET(common_tssp)->tss_ebp);
|
||||
t = PCPU_GET(common_tssp);
|
||||
printf(
|
||||
"eip = %#08x esp = %#08x ebp = %#08x eax = %#08x\n"
|
||||
"edx = %#08x ecx = %#08x edi = %#08x esi = %#08x\n"
|
||||
"psl = %#08x cs = %#08x ss = %#08x ds = %#08x\n"
|
||||
"es = %#08x fs = %#08x gs = %#08x cr3 = %#08x\n",
|
||||
t->tss_eip, t->tss_esp, t->tss_ebp, t->tss_eax,
|
||||
t->tss_edx, t->tss_ecx, t->tss_edi, t->tss_esi,
|
||||
t->tss_eflags, t->tss_cs, t->tss_ss, t->tss_ds,
|
||||
t->tss_es, t->tss_fs, t->tss_gs, t->tss_cr3);
|
||||
#ifdef SMP
|
||||
/* two separate prints in case of a trap on an unmapped page */
|
||||
printf("cpuid = %d; ", PCPU_GET(cpuid));
|
||||
printf("apic id = %02x\n", PCPU_GET(apic_id));
|
||||
printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid),
|
||||
PCPU_GET(apic_id));
|
||||
#endif
|
||||
panic("double fault");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user