diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-26 14:57:44 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-27 15:46:42 +0200 |
commit | 9d9f20391d5d86e872e0fee91a3d24b2ed6e3f31 (patch) | |
tree | 8996de419f50cf53f64bec169b38a4557baa3749 /Kernel/Arch | |
parent | 065c6c307de4b5d0956a8c1d7e8d02c5a89db10e (diff) | |
download | serenity-9d9f20391d5d86e872e0fee91a3d24b2ed6e3f31.zip |
Kernel: Use macros for GDT indices instead of hardcoding the values
Diffstat (limited to 'Kernel/Arch')
-rw-r--r-- | Kernel/Arch/x86/common/Interrupts.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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() |