Struct dmar::DmarDeviceScope

source ·
pub struct DmarDeviceScope<'t> { /* private fields */ }
Expand description

DMAR Device Scope Structure.

This structure is described in Section 8.3.1 of the VT Directed I/O Spec.

Implementations§

source§

impl<'t> DmarDeviceScope<'t>

source

pub fn device_type(&self) -> u8

Returns the type of this device scope structure.

TODO: use an enum to represent possible device types.

  • 1: PCI Endpoint Device - The device identified by the ‘Path’ field is a PCI endpoint device. This type must not be used in Device Scope of DRHD structures with INCLUDE_PCI_ALL flag Set.
  • 2: PCI Sub-hierarchy - The device identified by the ‘Path’ field is a PCI-PCI bridge. In this case, the specified bridge device and all its downstream devices are included in the scope. This type must not be in Device Scope of DRHD structures with INCLUDE_PCI_ALL flag Set.
  • 3: IOAPIC - The device identified by the ‘Path’ field is an I/O APIC (or I/O SAPIC) device, enumerated through the ACPI MADT I/O APIC (or I/O SAPIC) structure.
  • 4: MSI_CAPABLE_HPET1 - The device identified by the ‘Path’ field is an HPET Timer Block capable of generating MSI (Message Signaled interrupts). HPET hardware is reported through ACPI HPET structure.
  • 5: ACPI_NAMESPACE_DEVICE - The device identified by the ‘Path’ field is an ACPI name-space enumerated
source

pub fn enumeration_id(&self) -> u8

Returns the Enumeration ID, which differs in meaning based on the type of this DmarDeviceScope structure.

source

pub fn start_bus_number(&self) -> u8

Returns the PCI bus number under which the device identified by this DmarDeviceScope exists.

source

pub fn path(&self) -> Result<&'t DeviceScopePath, &'static str>

Calculates and returns the hierarchical path (along the PCI bus) to the device specified by this DmarDeviceScope structure.

Warning – incomplete!

TODO: finish this function, it is not yet complete. It only returns the first path.

Trait Implementations§

source§

impl<'t> Debug for DmarDeviceScope<'t>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'t> RefUnwindSafe for DmarDeviceScope<'t>

§

impl<'t> Send for DmarDeviceScope<'t>

§

impl<'t> Sync for DmarDeviceScope<'t>

§

impl<'t> Unpin for DmarDeviceScope<'t>

§

impl<'t> UnwindSafe for DmarDeviceScope<'t>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.