mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
Kernel: Use macros for GDT indices instead of hardcoding the values
This commit is contained in:
parent
065c6c307d
commit
9d9f20391d
Notes:
sideshowbarker
2024-07-18 11:27:23 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/9d9f20391d5 Pull-request: https://github.com/SerenityOS/serenity/pull/8269 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/IdanHo
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue