#ifndef GDT_H #define GDT_H #include /* GDT Entry Structure */ struct gdt_entry { uint16_t limit_low; uint16_t base_low; uint8_t base_middle; uint8_t access; uint8_t granularity; uint8_t base_high; } __attribute__((packed)); /* GDT Pointer Structure */ struct gdt_ptr { uint16_t limit; uint32_t base; } __attribute__((packed, aligned(1))); /* Initialize GDT */ void init_gdt(void); /* Set a GDT gate (also used by TSS setup) */ void gdt_set_gate(int32_t num, uint32_t base, uint32_t limit, uint8_t access, uint8_t gran); #endif // GDT_H