gdt idt stuff

This commit is contained in:
2026-06-12 23:03:00 -04:00
parent 5e823e570b
commit 00fb70c25b
7 changed files with 67 additions and 19 deletions

View File

@@ -3,17 +3,17 @@
#include <stdint.h>
typedef struct {
typedef struct __attribute__((packed)){
uint16_t isr_low; // The lower 16 bits of the ISR's address
uint16_t kernel_cs; // The GDT segment selector the CPU will load into CS
uint8_t reserved; // Set to 0
uint8_t attributes;// Type and attributes flags
uint16_t isr_high; // The higher 16 bits of the ISR's address
} idt_entry __attribute__((packed));
} idt_entry;
typedef struct {
typedef struct __attribute__((packed)){
uint16_t limit;
uint32_t base;
} idt_ptr __attribute__((packed));
} idt_ptr;
#endif