Skip to main content

GenericAddressStructure

Struct GenericAddressStructure 

Source
#[repr(C, packed(1))]
pub struct GenericAddressStructure { pub address_space_id: u8, pub reg_bit_width: u8, pub reg_bit_offset: u8, pub access_size: u8, pub address: u64, }
Expand description

The Generic Address Structure (GAS) provides the platform with a robust means to describe register locations.

Fields§

§address_space_id: u8

The address space where the data structure or register exists. Defined values are:

  • 0x00 - System Memory space
  • 0x01 - System I/O space
  • 0x02 - PCI Configuration space
  • 0x03 - Embedded Controller
  • 0x04 - SMBus
  • 0x05 - SystemCMOS
  • 0x06 - PciBarTarget
  • 0x07 - IPMI
  • 0x08 - General PurposeIO
  • 0x09 - GenericSerialBus
  • 0x0A - Platform Communications Channel (PCC)
  • 0x0B - Platform Runtime Mechanism (PRM)
  • 0x0C to 0x7E - Reserved
  • 0x7F - Functional Fixed Hardware
  • 0x80 to 0xFF - OEM Defined
§reg_bit_width: u8

The size in bits of the given register. When addressing a data structure, this field must be zero.

§reg_bit_offset: u8

The bit offset of the given register at the given address. When addressing a data structure, this field must be zero.

§access_size: u8

Specifies access size. Unless otherwise defined by the Address Space ID:

  • 0 - Undefined (legacy reasons)
  • 1 - Byte access
  • 2 - Word access
  • 3 - Dword access
  • 4 - QWord access
§address: u64

The 64-bit address of the data structure or register in the given address space (relative to the processor).

Trait Implementations§

Source§

impl Clone for GenericAddressStructure

Source§

fn clone(&self) -> GenericAddressStructure

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 Copy for GenericAddressStructure

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, 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, 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.