Struct AcpiGenericAddress

Source
pub struct AcpiGenericAddress {
    pub space_id: GasAddressSpace,
    pub bit_width: u8,
    pub bit_offset: u8,
    pub access_width: u8,
    pub address: u64,
}
Expand description

GAS - Generic Address Structure

This struct represents an address in some address space - that could be main memory, port I/O, PCI configuration space, etc.

Fields§

§space_id: GasAddressSpace

What address space to access for this value

§bit_width: u8

The size in bits of the data pointed to by the address

§bit_offset: u8

The offset in bits of the data from the address

§access_width: u8

A value representing the access size needed to read data.

The value in this register does not match to number of bytes, rather there is a mapping as follows:

  • 1 = Byte access
  • 2 = Word access (2 bytes)
  • 3 = DWord access (4 bytes)
  • 4 = QWord access (8 bytes)

The AcpiGenericAddress::ACCESS_WIDTH_* consts can be used to reference these values.

This field is not represented by an enum because some values of space_id could use a different system.

§address: u64

The address where the data is stored

Implementations§

Source§

impl AcpiGenericAddress

Source

pub const ACCESS_WIDTH_1_BYTE: u8 = 1u8

The value of access_width corresponding to a byte access

Source

pub const ACCESS_WIDTH_2_BYTES: u8 = 2u8

The value of access_width corresponding to a word access (2 bytes)

Source

pub const ACCESS_WIDTH_4_BYTES: u8 = 3u8

The value of access_width corresponding to a double word access (4 bytes)

Source

pub const ACCESS_WIDTH_8_BYTES: u8 = 4u8

The value of access_width corresponding to a quad word access (8 bytes)

Trait Implementations§

Source§

impl Clone for AcpiGenericAddress

Source§

fn clone(&self) -> AcpiGenericAddress

Returns a copy 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 AcpiGenericAddress

Source§

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

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

impl Copy for AcpiGenericAddress

Auto Trait Implementations§

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.