Add procedure for searching RSDT Pointer (RSDP)

The newly added function only searchs the "RSD PTR "-signature in the
Main BIOS Area, not in the *Extended* BIOS Area. That should be fixed,
but right now, it's of little relevance.
This commit is contained in:
Eric-Paul Ickhorn 2024-08-14 10:24:16 +02:00
parent 1b7ef62c61
commit 95faf0cc5a
Signed by: epickh
GPG Key ID: 1358818BAA38B104
1 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,49 @@
MAIN_BIOS_AREA_START equ 0xe0000
; Arguments:
; -- None --
acpi_search_rsdp:
.prolog:
push esi
sub esp, 8
mov esi, esp
mov [esi], dword 0
mov [esi + 4], ecx
.search_loop_header:
mov ecx, MAIN_BIOS_AREA_START
.search_loop:
push ebp
mov ebp, esp
push ecx
push dword .signature
push dword 8
call mem_equal
mov esp, ebp
pop ebp
cmp ax, 0
jne .rsdp_found
add ecx, 16
cmp ecx, 0x100000
jb .search_loop
; If no "RSD PTR "-signature could be found
xor ecx, ecx
.rsdp_found:
mov eax, ecx
.epilog:
mov ecx, [esi + 4]
add esp, 8
pop esi
ret
.signature:
db "RSD PTR "