add: idt
This commit is contained in:
@ -6,4 +6,15 @@ struct idt_descriptor {
|
||||
uint32_t offset;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define IDT_SIZE 256
|
||||
struct idt_entry {
|
||||
uint16_t isr_low; // The lower 16 bits of the ISR's address
|
||||
uint16_t kernel_cs; // The GDT segment selector that the CPU will load
|
||||
// into CS before calling the ISR
|
||||
uint8_t reserved; // Set to zero
|
||||
uint8_t attributes; // Type and attributes; see the IDT page
|
||||
uint16_t isr_high; // The higher 16 bits of the ISR's address
|
||||
} __attribute__((packed));
|
||||
|
||||
#define IDT_SIZE 256
|
||||
|
||||
void init_idt(void);
|
Reference in New Issue
Block a user