SysCall/X64: Fixed CallBootService() for NOOPT.

This commit is contained in:
Mikhail Krichanov 2024-09-09 11:12:13 +03:00
parent 76ac8a5fb0
commit 0e8c250702

View File

@ -151,6 +151,8 @@ ASM_PFX(CoreBootServices):
push r8 push r8
push rdx push rdx
mov rbp, rsp mov rbp, rsp
; Reserve space on stack for 3 CallBootService arguments (NOOPT prerequisite).
sub rsp, 8*3
; Prepare CallBootService arguments. ; Prepare CallBootService arguments.
mov rcx, r10 mov rcx, r10
@ -166,8 +168,8 @@ ASM_PFX(CoreBootServices):
pop rax pop rax
; Step over Arguments [1..3]. ; Step over Arguments [1..3] and NOOPT buffer.
add rsp, 8*3 add rsp, 8*6
; Prepare SYSRET arguments. ; Prepare SYSRET arguments.
pop r11 pop r11