- if (regs->trapno < TRAP_TYPES)
- trapname = trap_type[regs->trapno];
-#undef panic
- panic("Kernel trap at 0x%08x, type %d=%s, registers:\n"
- "CR0: 0x%08x, CR2: 0x%08x, CR3: 0x%08x, CR4: 0x%08x\n"
- "EAX: 0x%08x, EBX: 0x%08x, ECX: 0x%08x, EDX: 0x%08x\n"
- "CR2: 0x%08x, EBP: 0x%08x, ESI: 0x%08x, EDI: 0x%08x\n"
- "EFL: 0x%08x, EIP: 0x%08x, CS: 0x%08x, DS: 0x%08x\n"
- "Error code: 0x%08x\n",
- regs->eip, regs->trapno, trapname, cr0, cr2, cr3, cr4,
- regs->eax,regs->ebx,regs->ecx,regs->edx,
- regs->cr2,regs->ebp,regs->esi,regs->edi,
- regs->efl,regs->eip,regs->cs & 0xFFFF, regs->ds & 0xFFFF, regs->err);
- /*
- * This next statement is not executed,
- * but it's needed to stop the compiler using tail call optimization
- * for the panic call - which confuses the subsequent backtrace.
- */
- cr0 = 0;
-}
-#else