28 lines
436 B
C
28 lines
436 B
C
#ifndef IDT_H
|
|
#define IDT_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define IDT_ENTRIES 256
|
|
|
|
struct idt_entry
|
|
{
|
|
uint16_t base_lo;
|
|
uint16_t sel;
|
|
uint8_t always0;
|
|
uint8_t flags;
|
|
uint16_t base_hi;
|
|
} __attribute__((packed));
|
|
|
|
struct idt_ptr
|
|
{
|
|
uint16_t limit;
|
|
uint32_t base;
|
|
} __attribute__((packed));
|
|
|
|
extern void idt_load();
|
|
|
|
void idt_install();
|
|
void idt_set_gate(uint8_t num, uint32_t base, uint16_t sel, uint8_t flags);
|
|
|
|
#endif |