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>
impl<'t> DmarDeviceScope<'t>
sourcepub fn device_type(&self) -> u8
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
sourcepub fn enumeration_id(&self) -> u8
pub fn enumeration_id(&self) -> u8
Returns the Enumeration ID, which differs in meaning based on the type
of this DmarDeviceScope
structure.
sourcepub fn start_bus_number(&self) -> u8
pub fn start_bus_number(&self) -> u8
Returns the PCI bus number under which the device identified
by this DmarDeviceScope
exists.
sourcepub fn path(&self) -> Result<&'t DeviceScopePath, &'static str>
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§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more