[][src]Struct rsdp::Rsdp

#[repr(C, packed)]pub struct Rsdp { /* fields omitted */ }

The first structure found in ACPI. It just tells us where the RSDT is.

On BIOS systems, it is either found in the first 1KB of the Extended Bios Data Area, or between 0x000E0000 and 0x000FFFFF. The signature is always on a 16 byte boundary. On (U)EFI, it may not be located in these locations, and so an address should be found in the EFI_SYSTEM_TABLE instead.

The recommended way of locating the RSDP is to let the bootloader do it - Multiboot2 can pass a tag with the physical address of it. If this is not possible, a manual scan can be done.

If revision > 0, (the hardware ACPI version is Version 2.0 or greater), the RSDP contains some new fields. For ACPI Version 1.0, these fields are not valid and should not be accessed. For ACPI Version 2.0+, xsdt_address should be used (truncated to u32 on x86) instead of rsdt_address.

Implementations

impl Rsdp[src]

pub unsafe fn search_for_on_bios<H>(
    handler: H
) -> Result<PhysicalMapping<H, Rsdp>, RsdpError> where
    H: AcpiHandler
[src]

This searches for a RSDP on BIOS systems.

Safety

This function probes memory in three locations:

  • It reads a word from 40:0e to locate the EBDA.
  • The first 1KiB of the EBDA (Extended BIOS Data Area).
  • The BIOS memory area at 0xe0000..=0xfffff.

This should be fine on all BIOS systems. However, UEFI platforms are free to put the RSDP wherever they please, so this won't always find the RSDP. Further, prodding these memory locations may have unintended side-effects. On UEFI systems, the RSDP should be found in the Configuration Table, using two GUIDs: - ACPI v1.0 structures use eb9d2d30-2d88-11d3-9a16-0090273fc14d. - ACPI v2.0 or later structures use 8868e871-e4f1-11d3-bc22-0080c73c8881.

pub fn validate(&self) -> Result<(), RsdpError>[src]

Checks that:

  1. The signature is correct
  2. The checksum is correct
  3. For Version 2.0+, that the extension checksum is correct

pub fn oem_id(&self) -> &str[src]

pub fn revision(&self) -> u8[src]

pub fn rsdt_address(&self) -> u32[src]

pub fn xsdt_address(&self) -> u64[src]

Auto Trait Implementations

impl Send for Rsdp

impl Sync for Rsdp

impl Unpin for Rsdp

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.