From ddc65d92d3ea74f5c26da02cbfbedf14ae30ec30 Mon Sep 17 00:00:00 2001 From: rgimad <33692565+rgimad@users.noreply.github.com> Date: Sun, 2 Feb 2025 17:11:50 +0300 Subject: [PATCH] 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? --- kernel/boot/bootx64.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/boot/bootx64.asm b/kernel/boot/bootx64.asm index 4d68c7d..e5ea037 100644 --- a/kernel/boot/bootx64.asm +++ b/kernel/boot/bootx64.asm @@ -108,8 +108,8 @@ proc main _efi_handle, _efi_table 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 - mov rcx, [rbx + EFI_SYSTEM_TABLE.BootServices] - fstcall [rcx + EFI_BOOT_SERVICES.SetWatchdogTimer], rcx, 0, 0, 0, 0 + mov rax, [rbx + EFI_SYSTEM_TABLE.BootServices] + fstcall [rax + EFI_BOOT_SERVICES.SetWatchdogTimer], 0, 0, 0, 0 test eax, eax jz @f mov rcx, msg_failed_disable_watchdog