1#ifndef IDT_H
 2#define IDT_H
 3
 4#include <stdint.h>
 5
 6// IDT Entry structure
 7struct idt_entry {
 8	uint16_t base_low;    // Lower 16 bits of handler address
 9	uint16_t selector;    // Kernel segment selector (CODE_SEG)
10	uint8_t  zero;        // Always zero
11	uint8_t  flags;       // Flags (Type/Attributes)
12	uint16_t base_high;   // Upper 16 bits of handler address
13} __attribute__((packed));
14
15// IDT Pointer structure for LIDT
16struct idt_ptr {
17	uint16_t limit;
18	uint32_t base;
19} __attribute__((packed));
20
21void init_idt();
22void set_idt_gate(int n, uint32_t handler);
23
24#endif