#[repr(C, packed(1))]pub struct IvrsHeader {
pub header: Sdt,
pub ivinfo: u16,
pub _reserved1: u8,
pub flags: u8,
pub total_length: u16,
pub dev_entry_count: u16,
pub entry_offset: u16,
}Expand description
Fixed header of the IVRS ACPI table (AMD IOMMU).
Fields§
§header: Sdt§ivinfo: u16Virtualisation information.
_reserved1: u8§flags: u8Flags: bit 0 = Draint, bit 1 = Coherent.
total_length: u16Total length of the IVRS table including all IVHD/IVMD blocks.
dev_entry_count: u16Number of device entries across all IVHD blocks.
entry_offset: u16Byte offset from the start of the table to the first IVHD/IVMD entry.
Implementations§
Source§impl IvrsHeader
impl IvrsHeader
Sourcepub fn has_draint(&self) -> bool
pub fn has_draint(&self) -> bool
Check whether the Draint flag is set (all devices behind IOMMU).
Sourcepub fn is_coherent(&self) -> bool
pub fn is_coherent(&self) -> bool
Check whether the Coherent flag is set (I/O coherent).
Sourcepub fn ivhd_ivmd_count(&self) -> usize
pub fn ivhd_ivmd_count(&self) -> usize
Return the number of IVHD/IVMD entries.
Sourcepub fn entries(&self) -> IvrsEntryIter<'_>
pub fn entries(&self) -> IvrsEntryIter<'_>
Iterate over all IVHD/IVMD blocks and device entries within IVHD blocks.
Trait Implementations§
Source§impl Clone for IvrsHeader
impl Clone for IvrsHeader
Source§fn clone(&self) -> IvrsHeader
fn clone(&self) -> IvrsHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for IvrsHeader
Source§impl Debug for IvrsHeader
impl Debug for IvrsHeader
Source§impl FromBytes for IvrsHeader
impl FromBytes for IvrsHeader
Source§impl FromZeros for IvrsHeader
impl FromZeros for IvrsHeader
Source§impl TryFromBytes for IvrsHeader
impl TryFromBytes for IvrsHeader
§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for IvrsHeader
impl RefUnwindSafe for IvrsHeader
impl Send for IvrsHeader
impl Sync for IvrsHeader
impl Unpin for IvrsHeader
impl UnsafeUnpin for IvrsHeader
impl UnwindSafe for IvrsHeader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more