//! general protection fault void _cdecl general_protection_fault (uint32_t eip,uint32_t cs,uint32_t flags,uint32_t err) { intstart (); kernel_panic ("General Protection Fault at physical address [0x%x:0x%x] EFLAGS [0x%x]", cs,cs, cs); for (;;); }
//! page fault void _cdecl page_fault (uint32_t eip,uint32_t cs,uint32_t flags,uint32_t err) { intstart (); int faultAddr=0; _asm { mov eax, cr2 mov [faultAddr], eax } kernel_panic ("Page Fault at 0x%x:0x%x refrenced memory at 0x%x", cs, eip, faultAddr); for (;;); }
//! segment not present void _cdecl no_segment_fault (uint32_t eip,uint32_t cs,uint32_t flags,uint32_t err) { intstart (); kernel_panic ("Invalid segment at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* invalid opcode instruction */ void interrupt _cdecl invalid_opcode_fault(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Invalid opcode"); for (;;); }
/* Overflow trap */ void interrupt _cdecl overflow_trap(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Overflow trap"); for (;;); }
/* No Maskable interrupt trap */ void interrupt _cdecl nmi_trap(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("NMI trap"); for (;;); }
/* Machine Check */ void interrupt _cdecl machine_check_abort(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Machine Check"); for (;;); }
/* General Protection Fault */ void interrupt _cdecl general_protection_fault(uint32_t cs,uint32_t err,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("General Protection Fault"); for (;;); }
/* Segment not present */ void interrupt _cdecl no_segment_fault(uint32_t cs,uint32_t err,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Invalid segment"); for (;;); }
//! divide by 0 fault void _cdecl divide_by_zero_fault (uint32_t eip, uint32_t cs, uint32_t flags) { intstart (); kernel_panic ("Divide by 0 at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
//! Floating Point Unit (FPU) Single Instruction Multiple Data (SIMD) error void interrupt _cdecl simd_fpu_fault (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("FPU SIMD fault at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
//! machine check void interrupt _cdecl machine_check_abort (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("Machine Check at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
//! alignment check void interrupt _cdecl alignment_check_fault (uint32_t eip,uint32_t cs,uint32_t flags,uint32_t err) { intstart (); kernel_panic ("Alignment Check at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
//! stack fault void _cdecl stack_fault (uint32_t eip,uint32_t cs,uint32_t flags,uint32_t err) { intstart (); kernel_panic ("Stack fault at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* Double Fault */ void interrupt _cdecl double_fault_abort(uint32_t cs,uint32_t err,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Double fault"); for (;;); }
//! single step void _cdecl single_step_trap (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("Single step at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* Invalid TSS */ void interrupt _cdecl invalid_tss_fault(uint32_t cs,uint32_t err,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Invalid TSS"); for (;;); }
//! breakpoint hit void _cdecl breakpoint_trap (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("Breakpoint trap at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* Stack fault */ void interrupt _cdecl stack_fault(uint32_t cs,uint32_t err,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Stack fault"); for (;;); }
//! overflow void _cdecl overflow_trap (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("Overflow trap at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* Alignment Check */ void interrupt _cdecl alignment_check_fault(uint32_t cs,uint32_t err,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Alignment Check"); for (;;); }
//! bounds check void _cdecl bounds_check_fault (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("Bounds check fault at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* FPU Single Instruction Multiple Data (SIMD) error */ void interrupt _cdecl simd_fpu_fault(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("FPU SIMD fault"); for (;;); }
//! invalid opcode / instruction void _cdecl invalid_opcode_fault (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("Invalid opcode at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* Breakpoint hit */ void interrupt _cdecl breakpoint_trap(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Breakpoint trap"); for (;;); }
//! device not available void _cdecl no_device_fault (uint32_t cs, uint32_t eip, uint32_t flags) { intstart (); kernel_panic ("Device not found fault at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* Bounds check */ void interrupt _cdecl bounds_check_fault(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Bounds check fault"); for (;;); }
//! double fault void _cdecl double_fault_abort (uint32_t eip,uint32_t cs,uint32_t flags,uint32_t err) { intstart (); kernel_panic ("Double fault at physical address [0x%x:0x%x] EFLAGS [0x%x]",cs,eip, flags); for (;;); }
/* Device not available */ void interrupt _cdecl no_device_fault(uint32_t cs,uint32_t eip,uint32_t eflags) { intstart (); kernel_panic("Device not found"); for (;;); }
//! single step void interrupt _cdecl single_step_trap (unsigned int cs, unsigned int eip, unsigned int eflags) { intstart (); kernel_panic ("Single step"); for (;;); }