Struct acpi::AcpiTables[][src]

pub struct AcpiTables<H> where
    H: AcpiHandler
{ pub revision: u8, pub sdts: BTreeMap<Signature, Sdt>, pub dsdt: Option<AmlTable>, pub ssdts: Vec<AmlTable>, // some fields omitted }

Fields

revision: u8

The revision of ACPI that the system uses, as inferred from the revision of the RSDT/XSDT.

sdts: BTreeMap<Signature, Sdt>dsdt: Option<AmlTable>ssdts: Vec<AmlTable>

Implementations

Create an AcpiTables if you have the physical address of the RSDP.

Search for the RSDP on a BIOS platform. This accesses BIOS-specific memory locations and will probably not work on UEFI platforms. See Rsdp::search_for_rsdp_bios for details.

Create an AcpiTables if you have a PhysicalMapping of the RSDP that you know is correct. This is called from from_rsdp after validation, but can also be used if you’ve searched for the RSDP manually on a BIOS system.

Create an AcpiTables if you have the physical address of the RSDT. This is useful, for example, if your chosen bootloader reads the RSDP and passes you the address of the RSDT. You also need to supply the correct ACPI revision - if 0, a RSDT is expected, while a XSDT is expected for greater revisions.

Construct an AcpiTables from a custom set of “discovered” tables. This is provided to allow the library to be used from unconventional settings (e.g. in userspace), for example with a AcpiHandler that detects accesses to specific physical addresses, and provides the correct data.

Create a mapping to a SDT, given its signature. This validates the SDT if it has not already been validated.

Safety

The table’s memory is naively interpreted as a T, and so you must be careful in providing a type that correctly represents the table’s structure. Regardless of the provided type’s size, the region mapped will be the size specified in the SDT’s header. Providing a T that is larger than this, may lead to page-faults, aliasing references, or derefencing uninitialized memory (the latter two of which are UB). This isn’t forbidden, however, because some tables rely on T being larger than a provided SDT in some versions of ACPI (the ExtendedField type will be useful if you need to do this. See our Fadt type for an example of this).

Convenience method for contructing a PlatformInfo. This is one of the first things you should usually do with an AcpiTables, and allows to collect helpful information about the platform from the ACPI tables.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.