fix a few bugs in scheduling and synchronization, separate OVMF_VARS for debug

This commit is contained in:
maksw committed 2026-05-02 11:34:30 +02:00
1 parent 5cf7a20ea2
commit 129be91e15
17 files changed
+174 -211

No files matched your search

+7 -2
View File
@@ -64,9 +64,14 @@ KeSwitchContext ENDP
;
; We load RCX from the stack (first arg per MS x64), then IRETQ.
; -------------------------------------------------------------------------
EXTERN KeSchedulerPostSwitch : PROC
KeThreadEntry PROC
pop rcx ; user arg
iretq ; pops RIP, CS, RFLAGS, RSP, SS -> ring 3
sub rsp, 32 ; Reserve shadow space
call KeSchedulerPostSwitch
add rsp, 32
pop rcx ; load user arg
iretq ; -> ring 3
KeThreadEntry ENDP
END