pub struct Rsdp { /* private fields */ }Expand description
The first structure found in ACPI. It just tells us where the RSDT is.
On BIOS systems, it is either found in the first 1KiB 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 configuration 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§
Source§impl Rsdp
impl Rsdp
Sourcepub unsafe fn search_for_on_bios<H>(
handler: H,
) -> AcpiResult<PhysicalMapping<H, Rsdp>>where
H: AcpiHandler,
pub unsafe fn search_for_on_bios<H>(
handler: H,
) -> AcpiResult<PhysicalMapping<H, Rsdp>>where
H: AcpiHandler,
This searches for a RSDP on BIOS systems.
§Safety
This function probes memory in three locations:
- It reads a word from
40:0eto 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.
You should search the entire table for the v2.0 GUID before searching for the v1.0 one.
Sourcepub fn validate(&self) -> AcpiResult<()>
pub fn validate(&self) -> AcpiResult<()>
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 signature(&self) -> [u8; 8]
pub fn checksum(&self) -> u8
pub fn oem_id(&self) -> &str
pub fn revision(&self) -> u8
pub fn rsdt_address(&self) -> u32
pub fn length(&self) -> u32
pub fn xsdt_address(&self) -> u64
pub fn ext_checksum(&self) -> u8
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rsdp
impl RefUnwindSafe for Rsdp
impl Send for Rsdp
impl Sync for Rsdp
impl Unpin for Rsdp
impl UnwindSafe for Rsdp
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)