From 9d9f20391d5d86e872e0fee91a3d24b2ed6e3f31 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 26 Jun 2021 14:57:44 +0200 Subject: Kernel: Use macros for GDT indices instead of hardcoding the values --- Kernel/Arch/x86/common/Interrupts.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Kernel') diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp index fe6db5c2ec..7200f37dfa 100644 --- a/Kernel/Arch/x86/common/Interrupts.cpp +++ b/Kernel/Arch/x86/common/Interrupts.cpp @@ -585,18 +585,16 @@ void unregister_generic_interrupt_handler(u8 interrupt_number, GenericInterruptH UNMAP_AFTER_INIT void register_interrupt_handler(u8 index, void (*handler)()) { - // FIXME: Why is that with selector 8? // FIXME: Is the Gate Type really required to be an Interrupt // FIXME: What's up with that storage segment 0? - s_idt[index] = IDTEntry((FlatPtr)handler, 8, IDTEntryType::InterruptGate32, 0, 0); + s_idt[index] = IDTEntry((FlatPtr)handler, GDT_SELECTOR_CODE0, IDTEntryType::InterruptGate32, 0, 0); } UNMAP_AFTER_INIT void register_user_callable_interrupt_handler(u8 index, void (*handler)()) { - // FIXME: Why is that with selector 8? // FIXME: Is the Gate Type really required to be a Trap // FIXME: What's up with that storage segment 0? - s_idt[index] = IDTEntry((FlatPtr)handler, 8, IDTEntryType::TrapGate32, 0, 3); + s_idt[index] = IDTEntry((FlatPtr)handler, GDT_SELECTOR_CODE0, IDTEntryType::TrapGate32, 0, 3); } UNMAP_AFTER_INIT void flush_idt() -- cgit v1.2.3