started on isr/idt stuff

This commit is contained in:
2026-06-11 23:23:39 -05:00
parent eb1e096bac
commit 5e823e570b
5 changed files with 186 additions and 0 deletions

19
kernel/idt.h Normal file
View File

@@ -0,0 +1,19 @@
#ifndef KIDT_H
#define KIDT_H
#include <stdint.h>
typedef struct {
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));
typedef struct {
uint16_t limit;
uint32_t base;
} idt_ptr __attribute__((packed));
#endif