; 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
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]
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:
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