pub struct AmdL1CacheInformation(/* private fields */);Expand description
The layout of AMD_L1_DATA_CACHE_INFO and
AMD_L1_INSTRUCTION_CACHE_INFO.
Implementations§
Source§impl AmdL1CacheInformation
impl AmdL1CacheInformation
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 = 24
pub const SIZE_KB_SHIFT: usize = 24
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 = 16
pub const ASSOC_SHIFT: usize = 16
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: u8) -> &mut Self
pub const fn set_size_kb(&mut self, value: u8) -> &mut Self
Sets the value of AmdL1CacheInformation[31:24].
Sourcepub const fn set_assoc(&mut self, value: u8) -> &mut Self
pub const fn set_assoc(&mut self, value: u8) -> &mut Self
Sets the value of AmdL1CacheInformation[23:16].
Sourcepub const fn lines_per_tag(&self) -> u8
pub const fn lines_per_tag(&self) -> u8
The value of AmdL1CacheInformation[15: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 AmdL1CacheInformation[15: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 AmdL1CacheInformation[7:0].
Source§impl AmdL1CacheInformation
impl AmdL1CacheInformation
pub const FULLY_ASSOCIATIVE: u8 = 0xff
pub fn ways_of_associativity(&self) -> usize
pub fn fully_associative(&self) -> Option<bool>
Trait Implementations§
Source§impl Binary for AmdL1CacheInformation
impl Binary for AmdL1CacheInformation
Source§impl Clone for AmdL1CacheInformation
impl Clone for AmdL1CacheInformation
Source§fn clone(&self) -> AmdL1CacheInformation
fn clone(&self) -> AmdL1CacheInformation
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AmdL1CacheInformation
Source§impl Debug for AmdL1CacheInformation
impl Debug for AmdL1CacheInformation
Source§impl Default for AmdL1CacheInformation
impl Default for AmdL1CacheInformation
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 AmdL1CacheInformation
Source§impl From<AmdL1CacheInformation> for u32
impl From<AmdL1CacheInformation> for u32
Source§fn from(value: AmdL1CacheInformation) -> Self
fn from(value: AmdL1CacheInformation) -> Self
Source§impl From<u32> for AmdL1CacheInformation
impl From<u32> for AmdL1CacheInformation
Source§impl IntoIterator for AmdL1CacheInformation
impl IntoIterator for AmdL1CacheInformation
Source§impl<'a> IntoIterator for &'a AmdL1CacheInformation
impl<'a> IntoIterator for &'a AmdL1CacheInformation
Source§impl LowerHex for AmdL1CacheInformation
impl LowerHex for AmdL1CacheInformation
Source§impl Octal for AmdL1CacheInformation
impl Octal for AmdL1CacheInformation
Source§impl PartialEq for AmdL1CacheInformation
impl PartialEq for AmdL1CacheInformation
impl StructuralPartialEq for AmdL1CacheInformation
Auto Trait Implementations§
impl Freeze for AmdL1CacheInformation
impl RefUnwindSafe for AmdL1CacheInformation
impl Send for AmdL1CacheInformation
impl Sync for AmdL1CacheInformation
impl Unpin for AmdL1CacheInformation
impl UnsafeUnpin for AmdL1CacheInformation
impl UnwindSafe for AmdL1CacheInformation
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)