summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2023-11-26 18:22:09 -0600
committerDanny Holman <dholman@gymli.org>2023-11-26 18:22:09 -0600
commit02e0911d60b227740bd8ff1b6142714d3bcf6472 (patch)
treef8ce9a0ea164c3e191030ca3209c4dd5f02b2603 /arch
parent5be734b1ad07f531e4b8af88644ef8dd7e03baf7 (diff)
arch: i386: idt.c: remove unneeded define macros
Remove several preprocessor macros that serve no purpose and pollute the source file. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/boot/idt.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/arch/i386/boot/idt.c b/arch/i386/boot/idt.c
index bd27542..5088dba 100644
--- a/arch/i386/boot/idt.c
+++ b/arch/i386/boot/idt.c
@@ -3,31 +3,9 @@
#include <kernel/io.h>
#include <kernel/pic.h>
#include <kernel/string.h>
+#include <kernel/paging.h>
#include <stdint.h>
-#define SEGMENT_PRESENT 0x80
-#define SEGMENT_RING0 0x00
-#define SEGMENT_RING3 0x60
-#define SEGMENT_STORAGE 0x00
-#define SEGMENT_INTERRUPT 0x0E
-#define IDT_EXCEPTION (SEGMENT_PRESENT | SEGMENT_INTERRUPT)
-#define IDT_INTERRUPT (SEGMENT_PRESENT | SEGMENT_INTERRUPT)
-
-#define IDT_MAX_DESCRIPTORS 256
-
-struct idt_entry {
- uint16_t isr_low;
- uint16_t kernel_cs;
- uint8_t reserved;
- uint8_t flags;
- uint16_t isr_high;
-} __attribute__((packed));
-
-struct idt_ptr {
- uint16_t limit;
- uint32_t base;
-} __attribute__((packed));
-
__attribute__((aligned(0x10)))
struct idt_entry idt[256];
struct idt_ptr idtr;