From: John Tsiombikas Date: Mon, 4 Jul 2022 14:41:56 +0000 (+0300) Subject: fixed the boot services offset X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=efitest2;a=commitdiff_plain;h=HEAD fixed the boot services offset --- diff --git a/efitest.asm b/efitest.asm index 2cc79a2..1a8e212 100644 --- a/efitest.asm +++ b/efitest.asm @@ -5,7 +5,7 @@ ; EFI_SYSTEM_TABLE offsets SIMPLE_TEXT_OUTPUT equ 64 -BOOT_SERVICES equ 80 +BOOT_SERVICES equ 96 ; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL function offsets TEXT_OUT_STRING equ 8 @@ -58,11 +58,11 @@ start: lea r9, [mmap_descsz] lea rax, [mmap_descver] push rax - push rax + sub rsp, 32 mov rax, [systab] mov rbx, [rax + BOOT_SERVICES] call [rbx + BOOT_GET_MEMORY_MAP] - add rsp, 16 + add rsp, 40 mov rcx, [efihandle] mov rdx, [mmap_key] @@ -70,6 +70,11 @@ start: mov rbx, [rax + BOOT_SERVICES] call [rbx + BOOT_EXIT_BOOT_SERVICES] + mov edi, 0a0000h + mov ecx, 16000 + mov eax, 00ff0000h + rep stosd + .hang: jmp .hang get_rip: @@ -119,7 +124,7 @@ str_hello dw __utf16__(`qurashee!\r\n`),0 align 8 ; memory map data -mmap_size dq 0 +mmap_size dq 4096 mmap_key dq 0 mmap_descsz dq 0 mmap_descver dq 0