Pass the firmware ACPI RSDP through boot_info so the kernel can locate the FADT. Shutdown now writes the S5 sleep type to the PM1a/PM1b control blocks advertised by the FADT instead of fixed QEMU/Bochs/VirtualBox ports. - boot: capture the ACPI 2.0/1.0 RSDP from the UEFI configuration table - kernel: add platform/acpi; walk RSDP -> RSDT/XSDT -> FADT - syscall: power_shutdown calls acpi.poweroff()
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
MEMORY_TYPE_AVAILABLE: uint64 = 7
|
|
MEMORY_TYPE_RESERVED: uint64 = 0
|
|
MEMORY_TYPE_LOADER_CODE: uint64 = 1
|
|
MEMORY_TYPE_LOADER_DATA: uint64 = 2
|
|
MEMORY_TYPE_BOOT_SERVICES_CODE: uint64 = 3
|
|
MEMORY_TYPE_BOOT_SERVICES_DATA: uint64 = 4
|
|
MEMORY_TYPE_RUNTIME_SERVICES_CODE: uint64 = 5
|
|
MEMORY_TYPE_RUNTIME_SERVICES_DATA: uint64 = 6
|
|
MEMORY_TYPE_ACPI_RECLAIMABLE: uint64 = 9
|
|
MEMORY_TYPE_ACPI_NVS: uint64 = 10
|
|
MEMORY_TYPE_BAD_MEMORY: uint64 = 8
|
|
|
|
@__attribute__(packed)
|
|
class memory_map_entry:
|
|
type: uint
|
|
_pad: uint
|
|
physical_start: uint64
|
|
virtual_start: uint64
|
|
num_pages: uint64
|
|
attribute: uint64
|
|
|
|
class bootinfo:
|
|
MemmapAddr: uint64
|
|
MemmapSize: uint64
|
|
MemmapDescSize: uint64
|
|
kernel_PhysAddr: uint64
|
|
framebuffer_addr: uint64
|
|
framebuffer_size: uint64
|
|
framebuffer_width: uint64
|
|
framebuffer_height: uint64
|
|
framebuffer_pitch: uint64
|
|
framebuffer_format: uint64
|
|
system_table: uint64
|
|
acpi_rsdp: uint64
|