réplica de
https://github.com/Arnau478/quark.git
synced 2024-05-15 19:36:29 +02:00
56 líneas
1,1 KiB
C
56 líneas
1,1 KiB
C
#include "isr.h"
|
|
#include "../../stdio.h"
|
|
|
|
static isr_handler g_isr_handlers[256];
|
|
|
|
static const char *const g_exceptions[] = {
|
|
"Divide by zero error",
|
|
"Debug",
|
|
"Non-maskable interrupt",
|
|
"Breakpoint",
|
|
"Overflow",
|
|
"Bound range exceeded",
|
|
"Invalid opcode",
|
|
"Device not available",
|
|
"Double fault",
|
|
"Coprocessor segment overrun",
|
|
"Invalid TTS",
|
|
"Segment not present",
|
|
"Stack-segment fault",
|
|
"General protection fault",
|
|
"Page fault",
|
|
"",
|
|
"x87 floating point exception",
|
|
"Alignment check",
|
|
"Machine check",
|
|
"SIMD floating-point exception",
|
|
"Virtualization exception",
|
|
"Control protection exception",
|
|
"",
|
|
"",
|
|
"",
|
|
"",
|
|
"",
|
|
"",
|
|
"Hypervisor injection exception",
|
|
"VMM communication exception",
|
|
"Security exception",
|
|
""
|
|
};
|
|
|
|
void i686_isr_initialize_gates();
|
|
|
|
void i686_isr_initialize(){
|
|
i686_isr_initialize_gates();
|
|
|
|
// Remap PIC
|
|
}
|
|
|
|
void i686_isr_handler(registers *regs){
|
|
printf("Interrupt %i\n", regs->interrupt);
|
|
}
|
|
|
|
void i686_isr_register_handler(int interrupt, isr_handler handler){
|
|
g_isr_handlers[interrupt] = handler;
|
|
}
|