Fadt

Struct Fadt 

Source
pub struct Fadt { /* private fields */ }
Expand description

Fixed ACPI Description Table (FADT)

This table includes fixed hardware ACPI information such as addresses of register blocks and the pointer to the DSDT table. More information about this table can be found in the ACPI specification: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#fixed-acpi-description-table-fadt

Implementations§

Source§

impl Fadt

Source

pub fn new(oem_id: [u8; 6], oem_table_id: [u8; 8], oem_revision: u32) -> Self

Source

pub fn set_x_dsdt(&mut self, addr: u64)

Set the address of the DSDT table

This sets the 64bit variant, X_DSDT field of the FADT table

Source

pub fn set_flags(&mut self, flags: u32)

Set the FADT flags

Source

pub fn setup_iapc_flags(&mut self, flags: u16)

Set the IA-PC specific flags

Source

pub fn set_hypervisor_vendor_id(&mut self, hypervisor_vendor_id: [u8; 8])

Set the hypervisor vendor ID

Trait Implementations§

Source§

impl Clone for Fadt

Source§

fn clone(&self) -> Fadt

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Fadt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Fadt

Source§

fn default() -> Fadt

Returns the “default value” for a type. Read more
Source§

impl IntoBytes for Fadt
where SdtHeader: IntoBytes, U32: IntoBytes, u8: IntoBytes, U16: IntoBytes, GenericAddressStructure: IntoBytes, U64: IntoBytes, [u8; 8]: IntoBytes,

§

fn as_bytes(&self) -> &[u8]
where Self: Immutable,

Gets the bytes of this value. Read more
§

fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to dst. Read more
§

fn write_to_prefix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the prefix of dst. Read more
§

fn write_to_suffix( &self, dst: &mut [u8], ) -> Result<(), SizeError<&Self, &mut [u8]>>
where Self: Immutable,

Writes a copy of self to the suffix of dst. Read more
Source§

impl Sdt for Fadt

Source§

fn len(&self) -> usize

Get the length of the table
Source§

fn write_to_guest<M: GuestMemory>( &mut self, mem: &M, address: GuestAddress, ) -> Result<()>

Write the table in guest memory
Source§

fn is_empty(&self) -> bool

Return true if Sdt is empty
Source§

impl Copy for Fadt

Source§

impl Immutable for Fadt
where SdtHeader: Immutable, U32: Immutable, u8: Immutable, U16: Immutable, GenericAddressStructure: Immutable, U64: Immutable, [u8; 8]: Immutable,

Auto Trait Implementations§

§

impl Freeze for Fadt

§

impl RefUnwindSafe for Fadt

§

impl Send for Fadt

§

impl Sync for Fadt

§

impl Unpin for Fadt

§

impl UnwindSafe for Fadt

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.