fixed stupid mistake with rcx destroying

todo: maybe use uefi_call_wrapper, it also seems like check alignment. Does fstcall chack alignment of stack by 16?
This commit is contained in:
rgimad
2025-02-02 17:11:50 +03:00
parent 2ee47b9cff
commit ddc65d92d3

View File

@@ -108,8 +108,8 @@ proc main _efi_handle, _efi_table
jnz $ ; loop if fail to init text jnz $ ; loop if fail to init text
; disable the default watchdog timer, otherwise it will reboot the pc after 5 mins of this app work ; disable the default watchdog timer, otherwise it will reboot the pc after 5 mins of this app work
mov rcx, [rbx + EFI_SYSTEM_TABLE.BootServices] mov rax, [rbx + EFI_SYSTEM_TABLE.BootServices]
fstcall [rcx + EFI_BOOT_SERVICES.SetWatchdogTimer], rcx, 0, 0, 0, 0 fstcall [rax + EFI_BOOT_SERVICES.SetWatchdogTimer], 0, 0, 0, 0
test eax, eax test eax, eax
jz @f jz @f
mov rcx, msg_failed_disable_watchdog mov rcx, msg_failed_disable_watchdog