AcpiTables

Struct AcpiTables 

Source
pub struct AcpiTables<H: Handler> {
    pub rsdp_revision: u8,
    /* private fields */
}
Expand description

AcpiTables should be constructed after finding the RSDP or RSDT/XSDT and allows enumeration of the system’s ACPI tables.

Fields§

§rsdp_revision: u8

Implementations§

Source§

impl<H> AcpiTables<H>
where H: Handler,

Source

pub unsafe fn from_rsdp( handler: H, rsdp_address: usize, ) -> Result<AcpiTables<H>, AcpiError>

Construct an AcpiTables from the physical address of the RSDP.

§Safety

The address of the RSDP must be valid.

Source

pub unsafe fn from_rsdt( handler: H, rsdp_revision: u8, rsdt_address: usize, ) -> Result<AcpiTables<H>, AcpiError>

Construct an AcpiTables from the physical address of the RSDT/XSDT, and the revision found in the RSDP.

§Safety

The address of the RSDT must be valid.

Source

pub fn table_entries(&self) -> impl Iterator<Item = usize>

Iterate over the physical addresses of the SDTs.

Source

pub fn table_headers(&self) -> impl Iterator<Item = (usize, SdtHeader)>

Iterate over the headers of each SDT, along with their physical addresses.

Source

pub fn find_tables<T>(&self) -> impl Iterator<Item = PhysicalMapping<H, T>>
where T: AcpiTable,

Find all tables with the signature T::SIGNATURE.

Source

pub fn find_table<T>(&self) -> Option<PhysicalMapping<H, T>>
where T: AcpiTable,

Find the first table with the signature T::SIGNATURE.

Source

pub fn dsdt(&self) -> Result<AmlTable, AcpiError>

Source

pub fn ssdts(&self) -> impl Iterator<Item = AmlTable>

Trait Implementations§

Source§

impl<H> Send for AcpiTables<H>
where H: Handler + Send,

Source§

impl<H> Sync for AcpiTables<H>
where H: Handler + Send,

Auto Trait Implementations§

§

impl<H> Freeze for AcpiTables<H>
where H: Freeze,

§

impl<H> RefUnwindSafe for AcpiTables<H>
where H: RefUnwindSafe,

§

impl<H> Unpin for AcpiTables<H>
where H: Unpin,

§

impl<H> UnwindSafe for AcpiTables<H>
where H: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.