Skip to main content

Module acpi

Module acpi 

Source
Expand description

ACPI (Advanced Configuration and Power Interface) support. Inspired by Theseus OS, MaestroOS, Aero, and Redox.

Features:

  • RSDP/RSDT/XSDT parsing
  • MADT (interrupts, APICs)
  • FADT (power management, DSDT)
  • HPET (timers)
  • MCFG (PCIe MMCONFIG)
  • DMAR (IOMMU)
  • WAET (VM optimization hints)
  • BGRT (boot graphics)
  • SLIT (NUMA distances)

TODO : take a look at the v6 : https://uefi.org/sites/default/files/resources/ACPI_Spec_6.6.pdf https://uefi.org/specs/ACPI/6.6/

Modulesยง

bgrt
Support for the BGRT ACPI table (Boot Graphics Resource Table). Provides information about the boot logo/image.
dmar
Definitions for the DMAR, the Direct Memory Access (DMA) Remapping ACPI table. Inspired by Theseus OS.
fadt
Definitions for FADT, the Fixed ACPI Description Table. Inspired by Theseus OS.
hpet
Support for the HPET: High Precision Event Timer. Inspired by Theseus OS.
madt
Support for the MADT ACPI table, which includes interrupt and multicore info. Inspired by Theseus OS.
mcfg
Support for MCFG (PCI Express MMCONFIG) ACPI table.
rsdt
Definitions for the ACPI RSDT and XSDT system tables. Inspired by Theseus OS.
sdt
ACPI table definitions and basic SDT structures. Inspired by Theseus OS.
slit
Support for the SLIT ACPI table (System Locality Information Table). Provides information about NUMA node distances.
waet
Definitions for WAET, the Windows ACPI Emulated devices Table. Inspired by Theseus OS.

Structsยง

AcpiTables
Table storage to keep track of discovered ACPI tables
Rsdp ๐Ÿ”’
RSDP (Root System Descriptor Pointer) : ACPI 1.0
Rsdp2 ๐Ÿ”’
RSDP extended : ACPI 2.0+

Staticsยง

ACPI_INITIALIZED ๐Ÿ”’
ACPI initialization status
ACPI_TABLES ๐Ÿ”’
RSDP_REVISION ๐Ÿ”’
RSDP revision (0 = ACPI 1.0, 2+ = ACPI 2.0+)
RSDP_VADDR ๐Ÿ”’
Stored RSDP virtual address (set during init)

Functionsยง

discover_tables ๐Ÿ”’
Performs the discover tables operation.
find_table
Find the first ACPI table by its 4-byte signature.
find_tables
Find all ACPI tables with the given 4-byte signature.
get_bgrt
Get BGRT table (boot graphics)
get_fadt
Get FADT table
get_hpet
Get HPET table
get_madt
Get MADT table
get_mcfg
Get MCFG table
get_slit
Get SLIT table (NUMA distances)
get_table
Get a typed reference to an ACPI table.
init
Initialize the ACPI subsystem.
is_available
Check if ACPI is initialized
revision
Get ACPI revision
rsdp_address
Get RSDP address
validate_checksum ๐Ÿ”’
Performs the validate checksum operation.
validate_sdt_at_phys ๐Ÿ”’
Performs the validate sdt at phys operation.