kernel: restart, reboot and power off

git-svn-id: svn://kolibrios.org@6244 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2016-02-18 02:03:38 +00:00
parent 465434cb12
commit 50e97c60fa
6 changed files with 277 additions and 396 deletions

View File

@@ -455,7 +455,27 @@ ACPI_FADT_SIGN equ 0x50434146
acpi_locate:
push ebx
push edi
movzx ebx, word [0x40E]
shl ebx, 4
lea ecx, [ebx+1024]
call .check
test ebx, ebx
jz @F
jmp .done
@@:
mov ebx, ACPI_HI_RSDP_WINDOW_START
mov edi, ACPI_HI_RSDP_WINDOW_END
call .check
.done:
mov eax, ebx
pop edi
pop ebx
ret
.check:
cmp [ebx], dword 0x20445352
jne .next
@@ -472,17 +492,12 @@ acpi_locate:
test al, al
jnz .next
mov eax, ebx
pop ebx
ret
.next:
add ebx, 16
cmp ebx, ACPI_HI_RSDP_WINDOW_END
cmp ebx, edi
jb .check
pop ebx
xor eax, eax
xor ebx, ebx
ret
align 4