aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/cpu/interrupts.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-03-21 10:13:17 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-03-21 10:16:21 +0100
commitc9ce8625dd80f701e280f90cb30c30f8663473e9 (patch)
tree08eb79b8e775fcd4ee8c334cd019caca8d6f61f3 /arch/x86_64/src/cpu/interrupts.cpp
parentfcf0cd73b0978c2db3e719542cf81d7d2c0fe24e (diff)
downloadteachos-c9ce8625dd80f701e280f90cb30c30f8663473e9.tar.xz
teachos-c9ce8625dd80f701e280f90cb30c30f8663473e9.zip
x86_64/cpu: fixup 8259 interrupt handling
We now mask the timer interrupt and ensure we are informing the PIC about us having handled the interrupt.
Diffstat (limited to 'arch/x86_64/src/cpu/interrupts.cpp')
-rw-r--r--arch/x86_64/src/cpu/interrupts.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86_64/src/cpu/interrupts.cpp b/arch/x86_64/src/cpu/interrupts.cpp
index 466389d..048c461 100644
--- a/arch/x86_64/src/cpu/interrupts.cpp
+++ b/arch/x86_64/src/cpu/interrupts.cpp
@@ -2,6 +2,7 @@
#include "kapi/cpu.hpp"
+#include "arch/cpu/legacy_pic.hpp"
#include "arch/cpu/segment_selector.hpp"
#include <kstd/print>
@@ -42,6 +43,9 @@ namespace arch::cpu
auto handle_legacy_interrupt(interrupt_frame * frame) -> void
{
kstd::println("[x86_64:SYS] Ignoring 8259 legacy interrupt {:#04x}", frame->interrupt.number);
+
+ pic_master_control_port::write(pic_end_of_interrupt);
+ pic_slave_control_port::write(pic_end_of_interrupt);
}
} // namespace