Switch to the unified (BIOS and UEFI) kernel image

The initial patch by bzt with my minor edits.

git-svn-id: svn://kolibrios.org@9958 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2024-01-14 01:39:36 +00:00
parent 2bab7c2093
commit 034dd79f43
13 changed files with 132 additions and 146 deletions

View File

@@ -480,6 +480,40 @@ sayerr:
apm_end:
_setcursor d80x25_top_num, 0
; --------------- ACPI ---------------------
ACPI_LO_RSDP_WINDOW_END = 0x000A0000
ACPI_HI_RSDP_WINDOW_START = 0x000E0000
acpi:
xor eax, eax
mov [es:BOOT_LO.devicesdat_data], eax
mov [es:BOOT_LO.devicesdat_size], eax
mov [es:BOOT_LO.acpi_rsdp], eax
push ds
mov ds, ax
mov ax, word [40Eh]
add ax, 64
.check:
mov ds, ax
cmp [ds:0], dword 'RSD '
jne .next
cmp [ds:4], dword 'PTR '
jne .next
shl eax, 4
mov [es:BOOT_LO.acpi_rsdp], eax
jmp .end
.next:
inc ax
; skip VRAM and ROM area A0000h to E0000h
cmp ax, (ACPI_LO_RSDP_WINDOW_END shr 4)
jne @f
add ax, ((ACPI_HI_RSDP_WINDOW_START - ACPI_LO_RSDP_WINDOW_END) shr 4)
@@: ; end of 1Mb?
or ax, ax
jnz .check
.end:
pop ds
if ~ defined extended_primary_loader
;CHECK current of code
cmp [cfgmanager.loader_block], -1