Crate acpi[−][src]
A library for parsing ACPI tables. This crate can be used by bootloaders and kernels for architectures that support ACPI. The crate is far from feature-complete, but can still be used for finding and parsing the static tables, which is enough to set up hardware such as the APIC and HPET on x86_64.
The crate is designed for use in conjunction with the aml
crate, which is the (much
less complete) AML parser used to parse the DSDT and SSDTs. These crates are separate because
some kernels may want to detect the static tables, but delay AML parsing to a later stage.
Usage
To use the library, you will need to provide an implementation of the AcpiHandler
trait,
which allows the library to make requests such as mapping a particular region of physical
memory into the virtual address space.
You should then call one of the entry points, based on how much information you have:
- Call
parse_rsdp
if you have the physical address of the RSDP - Call
parse_rsdt
if you have the physical address of the RSDT / XSDT - Call
search_for_rsdp_bios
if you don’t have the address of either structure, but you know you’re running on BIOS, not UEFI
All of these methods return an instance of Acpi
. This struct contains all the information
gathered from the static tables, and can be queried to set up hardware etc.
Re-exports
pub use crate::handler::AcpiHandler; |
pub use crate::handler::PhysicalMapping; |
pub use crate::interrupt::InterruptModel; |
Modules
handler | |
interrupt |
Structs
Acpi | |
AmlTable | |
HpetInfo | Information about the High Precision Event Timer |
PciConfigRegions | Describes a set of regions of physical memory used to access the PCIe configuration space. A
region is created for each entry in the MCFG. Given the segment group, bus, device number, and
function of a PCIe device, the |
Processor |
Enums
AcpiError | |
MadtError | |
PowerProfile | |
ProcessorState |
Functions
parse_rsdp⚠ | This is the entry point of |
parse_rsdt⚠ | This is the entry point of |
search_for_rsdp_bios⚠ | This is the entry point of |