summaryrefslogtreecommitdiff
path: root/kernel/cpu
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-28 11:34:35 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-28 11:34:35 -0400
commit6f720f67383fee1e143caf04cc537a11a170d7c6 (patch)
treecde2cc6e92a749fe6b78a3edfe3d7bb99f273b4e /kernel/cpu
parentstderr in write syscall (diff)
downloadcomus-6f720f67383fee1e143caf04cc537a11a170d7c6.tar.gz
comus-6f720f67383fee1e143caf04cc537a11a170d7c6.tar.bz2
comus-6f720f67383fee1e143caf04cc537a11a170d7c6.zip
fix pic eoi in timer
Diffstat (limited to 'kernel/cpu')
-rw-r--r--kernel/cpu/idt.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/cpu/idt.S b/kernel/cpu/idt.S
index 05c34f5..05f80c7 100644
--- a/kernel/cpu/idt.S
+++ b/kernel/cpu/idt.S
@@ -135,13 +135,15 @@ isr_stub_\num:
ISRRestore
.endm
+# we have to send eoi first since
+# idt_pic_timer may not return
.macro PICTimer num
.align 8
isr_stub_\num:
ISRSave
- callq idt_pic_timer
- movq $\num, %rdi
callq idt_pic_eoi
+ movq $\num, %rdi
+ callq idt_pic_timer
ISRRestore
.endm