#ifndef IDT_H #define IDT_H #include "core/types.h" #include "core/mem.h" #define IDT_MAX_ENTRY 200 #define IDT_INT_GATE 0x8E00 #define IDT_TRAP_GATE 0xEF00 typedef struct IDT_ENTRY { u16 segment; u32 offset; u16 type; } IDT_ENTRY; struct IDT_REGISTER { u16 limit; u32 base; } __attribute__((packed)); /** * Copy IDT into memory and load it */ void idt_init(); /** * Write an IDT entry into memory */ void idt_write_entry(IDT_ENTRY entry,int id); #endif