mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2025-10-13 21:25:07 -07:00
new OS
This commit is contained in:
24
kernel/idt.h
Normal file
24
kernel/idt.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#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
|
Reference in New Issue
Block a user