diff options
| author | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-08-05 14:33:51 +0200 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-08-05 14:33:51 +0200 |
| commit | bd7d4366b6643b5c6cd04f40dd32f5d9c9575fd6 (patch) | |
| tree | 92429e897be007d46c8f063a39a986df2124111a /include/idt.h | |
| parent | be3274c49d0ca5e31daa855c4c109d830fdead67 (diff) | |
organised files; switched to recursive make
Diffstat (limited to 'include/idt.h')
| -rw-r--r-- | include/idt.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/include/idt.h b/include/idt.h deleted file mode 100644 index 9ca9c3a..0000000 --- a/include/idt.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef IDT_H -#define IDT_H - -#include <stdint.h> - -#define GDT_CODE_SEG 0x08 - -#define INTERRUPT_GATE 0x8E -#define TRAP_GATE 0x8F - -struct idt_entry { - uint16_t offset_1; // offset bits 0..15 - uint16_t selector; // a code segment selector in GDT or LDT - uint8_t ist; // bits 0..2 holds Interrupt Stack Table offset, rest of bits zero. - uint8_t type_attributes; // gate type, dpl, and p fields - uint16_t offset_2; // offset bits 16..31 - uint32_t offset_3; // offset bits 32..63 - uint32_t zero; // reserved -} __attribute__((packed)); -typedef struct idt_entry idt_entry; - -struct idtp { - uint16_t size; - uint64_t offset; -} __attribute__((packed)); -typedef struct idtp idtp; - -void init_idt(void); -void load_idt(idtp* pointer); -void init_idt_table(void); -void add_to_idt(uint16_t num, uint64_t offset, uint16_t selector, uint8_t type); - - -#endif |
