...
This commit is contained in:
43
src/arch/x86_64/interrupts/exceptions.c
Normal file
43
src/arch/x86_64/interrupts/exceptions.c
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "exceptions.h"
|
||||
#include "../../arch.h"
|
||||
|
||||
static const char* exception_messages[32] = {
|
||||
"divide by zero",
|
||||
"debug",
|
||||
"non maskable interrupt",
|
||||
"breakpoint",
|
||||
"overflow",
|
||||
"bound range exceeded",
|
||||
"invalid opcode",
|
||||
"device not available",
|
||||
"double fault",
|
||||
"coprocessor segment overrun",
|
||||
"invalid tss",
|
||||
"segment not present",
|
||||
"stack-segment fault",
|
||||
"general protection fault",
|
||||
"page fault",
|
||||
"reserved",
|
||||
"x87 floating point exception",
|
||||
"alignment check",
|
||||
"machine check",
|
||||
"simd floating point exception",
|
||||
"virtualization exception",
|
||||
"control protection exception",
|
||||
"reserved",
|
||||
"reserved",
|
||||
"reserved",
|
||||
"reserved",
|
||||
"reserved",
|
||||
"reserved",
|
||||
"hypervisor injection exception",
|
||||
"vmm communication exception",
|
||||
"security exception",
|
||||
"reserved",
|
||||
};
|
||||
|
||||
void handle_exception(const isr_frame_t* frame)
|
||||
{
|
||||
printf("exception[%d]: %s, error code: %d\n", frame->int_no, exception_messages[frame->int_no], frame->err_code);
|
||||
panic();
|
||||
}
|
||||
Reference in New Issue
Block a user