ptos/amd64: cpu: Add Local APIC timer ISR stub

Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
2026-07-14 16:39:22 -04:00
parent fcfe1dfb4a
commit 0408b34438
2 changed files with 17 additions and 0 deletions
+8
View File
@@ -349,4 +349,12 @@ MdLapicInit(KPCR *Kpcr)
/* Calibrate the timer */ /* Calibrate the timer */
LapicTimerCalibrate(Mcb); LapicTimerCalibrate(Mcb);
/* Set the LAPIC timer ISR gate */
MdIdtSetGate(
0x81,
(UPTR)LapicTmrIsr,
IDT_INT_GATE,
0
);
} }
+9
View File
@@ -143,3 +143,12 @@ TrapPageFault:
1: cli 1: cli
hlt hlt
jmp 1b jmp 1b
.globl LapicTmrIsr
LapicTmrIsr:
INTR_ENTRY($0x81)
mov %rsp, %rdi
call HalContextSwitch
1: cli
hlt
jmp 1b