acpi::mcfg

Struct PciConfigRegions

source
pub struct PciConfigRegions<'a, A>
where A: Allocator,
{ /* private fields */ }
Expand description

Describes a set of regions of physical memory used to access the PCIe configuration space. A region is created for each entry in the MCFG. Given the segment group, bus, device number, and function of a PCIe device, the physical_address method on this will give you the physical address of the start of that device function’s configuration space (each function has 4096 bytes of configuration space in PCIe).

Implementations§

source§

impl<'a> PciConfigRegions<'a, Global>

source

pub fn new<H>( tables: &AcpiTables<H>, ) -> AcpiResult<PciConfigRegions<'a, Global>>
where H: AcpiHandler,

source§

impl<'a, A> PciConfigRegions<'a, A>
where A: Allocator,

source

pub fn new_in<H>( tables: &AcpiTables<H>, allocator: A, ) -> AcpiResult<PciConfigRegions<'a, A>>
where H: AcpiHandler,

source

pub fn physical_address( &self, segment_group_no: u16, bus: u8, device: u8, function: u8, ) -> Option<u64>

Get the physical address of the start of the configuration space for a given PCIe device function. Returns None if there isn’t an entry in the MCFG that manages that device.

source

pub fn iter(&self) -> PciConfigEntryIterator<'_>

Returns an iterator providing information about the system’s present PCI busses. This is roughly equivalent to manually iterating the system’s MCFG table.

Auto Trait Implementations§

§

impl<'a, A> Freeze for PciConfigRegions<'a, A>
where A: Freeze,

§

impl<'a, A> RefUnwindSafe for PciConfigRegions<'a, A>
where A: RefUnwindSafe,

§

impl<'a, A> Send for PciConfigRegions<'a, A>
where A: Send,

§

impl<'a, A> Sync for PciConfigRegions<'a, A>
where A: Sync,

§

impl<'a, A> Unpin for PciConfigRegions<'a, A>
where A: Unpin,

§

impl<'a, A> !UnwindSafe for PciConfigRegions<'a, A>

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