/****************************************************************** * idt.h - INTERRUPT DESCRIPTOR TABLE * * Contains structures and function declarations for IDT * ******************************************************************/ #ifndef __IDT_H #define __IDT_H /* Defines an IDT entry */ struct IdtEntry { unsigned short base_lo; unsigned short sel; unsigned char always0; unsigned char flags; unsigned short base_hi; } __attribute__((packed)); struct IdtPointer { unsigned short limit; unsigned int base; } __attribute__((packed)); /* This exists in 'start.asm', and is used to load our IDT */ extern void i86_IdtSetGate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags); extern struct IdtEntry* i86_IdtGetGate(unsigned char num); extern void i86_IdtInstall(); #endif