pub struct AmdL2CacheInformation(/* private fields */);Expand description
The layout of ECX in AMD_L2_CACHE_INFO.
Implementations§
Source§impl AmdL2CacheInformation
impl AmdL2CacheInformation
Sourcepub const RSVD1_MASK: u32
pub const RSVD1_MASK: u32
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u32
pub const RSVD0_MASK: u32
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u32
pub const DEFAULT: u32
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const SIZE_KB_MASK: u32
pub const SIZE_KB_MASK: u32
Unshifted bitmask of size_kb.
Sourcepub const SIZE_KB_SHIFT: usize = 16
pub const SIZE_KB_SHIFT: usize = 16
Bit shift (i.e., the low bit) of size_kb.
Sourcepub const ASSOC_MASK: u32
pub const ASSOC_MASK: u32
Unshifted bitmask of assoc.
Sourcepub const ASSOC_SHIFT: usize = 12
pub const ASSOC_SHIFT: usize = 12
Bit shift (i.e., the low bit) of assoc.
Sourcepub const LINES_PER_TAG_MASK: u32
pub const LINES_PER_TAG_MASK: u32
Unshifted bitmask of lines_per_tag.
Sourcepub const LINES_PER_TAG_SHIFT: usize = 8
pub const LINES_PER_TAG_SHIFT: usize = 8
Bit shift (i.e., the low bit) of lines_per_tag.
Sourcepub const LINE_SIZE_MASK: u32
pub const LINE_SIZE_MASK: u32
Unshifted bitmask of line_size.
Sourcepub const LINE_SIZE_SHIFT: usize = 0
pub const LINE_SIZE_SHIFT: usize = 0
Bit shift (i.e., the low bit) of line_size.
Sourcepub const FIELDS: [FieldMetadata<u32>; 4]
pub const FIELDS: [FieldMetadata<u32>; 4]
Metadata of all named fields in the layout.
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new instance with reserved-as-1 bits set and
all other bits zeroed (i.e., with a value of
Self::RSVD1_MASK).
pub const fn bits(self) -> u32
Sourcepub const fn set_size_kb(&mut self, value: u16) -> &mut Self
pub const fn set_size_kb(&mut self, value: u16) -> &mut Self
Sets the value of AmdL2CacheInformation[31:16].
Sourcepub fn assoc(&self) -> AmdL2L3Associativitywhere
AmdL2L3Associativity: TryFromBytes,
pub fn assoc(&self) -> AmdL2L3Associativitywhere
AmdL2L3Associativity: TryFromBytes,
The value of AmdL2CacheInformation[15:12].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_assoc to recover from invalid bit patterns.
Sourcepub fn try_assoc(&self) -> Result<AmdL2L3Associativity, InvalidBits<u8>>where
AmdL2L3Associativity: TryFromBytes,
pub fn try_assoc(&self) -> Result<AmdL2L3Associativity, InvalidBits<u8>>where
AmdL2L3Associativity: TryFromBytes,
Fallible variant of Self::assoc.
Sourcepub fn set_assoc(&mut self, value: AmdL2L3Associativity) -> &mut Self
pub fn set_assoc(&mut self, value: AmdL2L3Associativity) -> &mut Self
Sets the value of AmdL2CacheInformation[15:12].
Sourcepub const fn lines_per_tag(&self) -> u8
pub const fn lines_per_tag(&self) -> u8
The value of AmdL2CacheInformation[11:8].
Sourcepub const fn set_lines_per_tag(&mut self, value: u8) -> &mut Self
pub const fn set_lines_per_tag(&mut self, value: u8) -> &mut Self
Sets the value of AmdL2CacheInformation[11:8].
Sourcepub const fn set_line_size(&mut self, value: u8) -> &mut Self
pub const fn set_line_size(&mut self, value: u8) -> &mut Self
Sets the value of AmdL2CacheInformation[7:0].
Source§impl AmdL2CacheInformation
impl AmdL2CacheInformation
pub fn ways_of_associativity(&self) -> usize
pub fn fully_associative(&self) -> Option<bool>
Trait Implementations§
Source§impl Binary for AmdL2CacheInformation
impl Binary for AmdL2CacheInformation
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
Source§impl Clone for AmdL2CacheInformation
impl Clone for AmdL2CacheInformation
Source§fn clone(&self) -> AmdL2CacheInformation
fn clone(&self) -> AmdL2CacheInformation
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AmdL2CacheInformation
Source§impl Debug for AmdL2CacheInformation
impl Debug for AmdL2CacheInformation
Source§impl Default for AmdL2CacheInformation
impl Default for AmdL2CacheInformation
Source§fn default() -> Self
fn default() -> Self
Returns an instance with the default bits set (i.e,. with a
value of Self::DEFAULT.
impl Eq for AmdL2CacheInformation
Source§impl From<AmdL2CacheInformation> for u32
impl From<AmdL2CacheInformation> for u32
Source§fn from(value: AmdL2CacheInformation) -> Self
fn from(value: AmdL2CacheInformation) -> Self
Source§impl From<u32> for AmdL2CacheInformation
impl From<u32> for AmdL2CacheInformation
Source§impl IntoIterator for AmdL2CacheInformation
impl IntoIterator for AmdL2CacheInformation
Source§impl<'a> IntoIterator for &'a AmdL2CacheInformation
impl<'a> IntoIterator for &'a AmdL2CacheInformation
Source§impl LowerHex for AmdL2CacheInformation
impl LowerHex for AmdL2CacheInformation
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
Source§impl Octal for AmdL2CacheInformation
impl Octal for AmdL2CacheInformation
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
Source§impl PartialEq for AmdL2CacheInformation
impl PartialEq for AmdL2CacheInformation
impl StructuralPartialEq for AmdL2CacheInformation
Source§impl UpperHex for AmdL2CacheInformation
impl UpperHex for AmdL2CacheInformation
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
AmdL2L3Associativity: Debug,
Auto Trait Implementations§
impl Freeze for AmdL2CacheInformation
impl RefUnwindSafe for AmdL2CacheInformation
impl Send for AmdL2CacheInformation
impl Sync for AmdL2CacheInformation
impl Unpin for AmdL2CacheInformation
impl UnsafeUnpin for AmdL2CacheInformation
impl UnwindSafe for AmdL2CacheInformation
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)