mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2025-05-15 17:11:26 -07:00
25 lines
414 B
C
25 lines
414 B
C
#ifndef IDT_H
|
|
#define IDT_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define IDT_ENTRIES 256
|
|
|
|
typedef struct {
|
|
uint16_t offset_low;
|
|
uint16_t selector;
|
|
uint8_t zero;
|
|
uint8_t type_attr;
|
|
uint16_t offset_high;
|
|
} __attribute__((packed)) idt_entry_t;
|
|
|
|
typedef struct {
|
|
uint16_t limit;
|
|
uint32_t base;
|
|
} __attribute__((packed)) idt_ptr_t;
|
|
|
|
void idt_set_gate(int n, uint32_t handler);
|
|
void idt_init(void);
|
|
|
|
#endif
|