summaryrefslogtreecommitdiff
path: root/kernel/src/interrupt/idt.h
diff options
context:
space:
mode:
authorTyler Murphy <=>2023-07-17 19:34:52 -0400
committerTyler Murphy <=>2023-07-17 19:34:52 -0400
commit7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5 (patch)
tree4e86ff20e73171285156631db043e12aaf63bf04 /kernel/src/interrupt/idt.h
parentpaging (diff)
downloadfinix-7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5.tar.gz
finix-7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5.tar.bz2
finix-7a912d1b668ab86ffe088eca3ac7e6f78a04a0c5.zip
refactoring
Diffstat (limited to '')
-rw-r--r--kernel/src/interrupt/idt.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/kernel/src/interrupt/idt.h b/kernel/src/interrupt/idt.h
deleted file mode 100644
index 86a685f..0000000
--- a/kernel/src/interrupt/idt.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-
-#define IDT_SIZE 256
-#define IDT_INTERRUPTS 256
-
-struct IdtEntry {
- uint16_t isr_low;
- uint16_t kernel_cs;
- uint8_t _reserved;
- uint8_t attributes;
- uint16_t isr_high;
-} __attribute__((packed));
-
-struct Idtr {
- uint16_t limit;
- uint32_t base;
-} __attribute__((packed));
-
-enum IDTFlags {
- IDT_FLAG_GATE_TASK = 0x5,
- IDT_FLAG_GATE_16BIT_INT = 0x6,
- IDT_FLAG_GATE_16BIT_TRAP = 0x7,
- IDT_FLAG_GATE_32BIT_INT = 0xE,
- IDT_FLAG_GATE_32BIT_TRAP = 0xF,
-
- IDT_FLAG_RING0 = (0 << 5),
- IDT_FLAG_RING1 = (1 << 5),
- IDT_FLAG_RING2 = (2 << 5),
- IDT_FLAG_RING3 = (3 << 5),
-
- IDT_FLAG_PRESENT = 0x80,
-};
-
-void idt_init(void);