diff options
author | Liav A <liavalb@gmail.com> | 2020-03-14 20:19:38 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-24 16:15:33 +0100 |
commit | dbc536e91773c0083c9acd3908490daf851e5c4d (patch) | |
tree | e329371d4b3654ea20e30b898901076b46438988 /Kernel/Interrupts/InterruptManagement.cpp | |
parent | f86be46c989499562b0b9ab9cd194e16dbc5bb36 (diff) | |
download | serenity-dbc536e91773c0083c9acd3908490daf851e5c4d.zip |
Interrupts: Assert if trying to install an handler on syscall vector
Installing an interrupt handler on the syscall IDT vector can lead to
fatal results, so we must assert if that happens.
Diffstat (limited to 'Kernel/Interrupts/InterruptManagement.cpp')
-rw-r--r-- | Kernel/Interrupts/InterruptManagement.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Interrupts/InterruptManagement.cpp b/Kernel/Interrupts/InterruptManagement.cpp index 905551457a..11eb9745b2 100644 --- a/Kernel/Interrupts/InterruptManagement.cpp +++ b/Kernel/Interrupts/InterruptManagement.cpp @@ -34,6 +34,7 @@ #include <Kernel/Interrupts/PIC.h> #include <Kernel/Interrupts/SpuriousInterruptHandler.h> #include <Kernel/Interrupts/UnhandledInterruptHandler.h> +#include <Kernel/Syscall.h> #include <Kernel/VM/MemoryManager.h> #include <LibBareMetal/IO.h> @@ -99,6 +100,8 @@ u8 InterruptManagement::acquire_irq_number(u8 mapped_interrupt_vector) u8 InterruptManagement::get_mapped_interrupt_vector(u8 original_irq) { // FIXME: For SMP configuration (with IOAPICs) use a better routing scheme to make redirections more efficient. + // FIXME: Find a better way to handle conflict with Syscall interrupt gate. + ASSERT((original_irq + IRQ_VECTOR_BASE) != syscall_vector); return original_irq; } |