pub struct CacheLevelIdRegister(/* private fields */);Expand description
The layout of CLIDR_EL1.
Implementations§
Source§impl CacheLevelIdRegister
impl CacheLevelIdRegister
Sourcepub const RSVD1_MASK: u64
pub const RSVD1_MASK: u64
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u64
pub const RSVD0_MASK: u64
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u64
pub const DEFAULT: u64
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const TTYPE7_MASK: u64
pub const TTYPE7_MASK: u64
Unshifted bitmask of ttype7.
Sourcepub const TTYPE7_SHIFT: usize = 45
pub const TTYPE7_SHIFT: usize = 45
Bit shift (i.e., the low bit) of ttype7.
Sourcepub const TTYPE6_MASK: u64
pub const TTYPE6_MASK: u64
Unshifted bitmask of ttype6.
Sourcepub const TTYPE6_SHIFT: usize = 43
pub const TTYPE6_SHIFT: usize = 43
Bit shift (i.e., the low bit) of ttype6.
Sourcepub const TTYPE5_MASK: u64
pub const TTYPE5_MASK: u64
Unshifted bitmask of ttype5.
Sourcepub const TTYPE5_SHIFT: usize = 41
pub const TTYPE5_SHIFT: usize = 41
Bit shift (i.e., the low bit) of ttype5.
Sourcepub const TTYPE4_MASK: u64
pub const TTYPE4_MASK: u64
Unshifted bitmask of ttype4.
Sourcepub const TTYPE4_SHIFT: usize = 39
pub const TTYPE4_SHIFT: usize = 39
Bit shift (i.e., the low bit) of ttype4.
Sourcepub const TTYPE3_MASK: u64
pub const TTYPE3_MASK: u64
Unshifted bitmask of ttype3.
Sourcepub const TTYPE3_SHIFT: usize = 37
pub const TTYPE3_SHIFT: usize = 37
Bit shift (i.e., the low bit) of ttype3.
Sourcepub const TTYPE2_MASK: u64
pub const TTYPE2_MASK: u64
Unshifted bitmask of ttype2.
Sourcepub const TTYPE2_SHIFT: usize = 35
pub const TTYPE2_SHIFT: usize = 35
Bit shift (i.e., the low bit) of ttype2.
Sourcepub const TTYPE1_MASK: u64
pub const TTYPE1_MASK: u64
Unshifted bitmask of ttype1.
Sourcepub const TTYPE1_SHIFT: usize = 33
pub const TTYPE1_SHIFT: usize = 33
Bit shift (i.e., the low bit) of ttype1.
Sourcepub const LOU_U_MASK: u64
pub const LOU_U_MASK: u64
Unshifted bitmask of lou_u.
Sourcepub const LOU_U_SHIFT: usize = 27
pub const LOU_U_SHIFT: usize = 27
Bit shift (i.e., the low bit) of lou_u.
Sourcepub const LOU_IS_MASK: u64
pub const LOU_IS_MASK: u64
Unshifted bitmask of lou_is.
Sourcepub const LOU_IS_SHIFT: usize = 21
pub const LOU_IS_SHIFT: usize = 21
Bit shift (i.e., the low bit) of lou_is.
Sourcepub const CTYPE7_MASK: u64
pub const CTYPE7_MASK: u64
Unshifted bitmask of ctype7.
Sourcepub const CTYPE7_SHIFT: usize = 18
pub const CTYPE7_SHIFT: usize = 18
Bit shift (i.e., the low bit) of ctype7.
Sourcepub const CTYPE6_MASK: u64
pub const CTYPE6_MASK: u64
Unshifted bitmask of ctype6.
Sourcepub const CTYPE6_SHIFT: usize = 15
pub const CTYPE6_SHIFT: usize = 15
Bit shift (i.e., the low bit) of ctype6.
Sourcepub const CTYPE5_MASK: u64
pub const CTYPE5_MASK: u64
Unshifted bitmask of ctype5.
Sourcepub const CTYPE5_SHIFT: usize = 12
pub const CTYPE5_SHIFT: usize = 12
Bit shift (i.e., the low bit) of ctype5.
Sourcepub const CTYPE4_MASK: u64
pub const CTYPE4_MASK: u64
Unshifted bitmask of ctype4.
Sourcepub const CTYPE4_SHIFT: usize = 9
pub const CTYPE4_SHIFT: usize = 9
Bit shift (i.e., the low bit) of ctype4.
Sourcepub const CTYPE3_MASK: u64
pub const CTYPE3_MASK: u64
Unshifted bitmask of ctype3.
Sourcepub const CTYPE3_SHIFT: usize = 6
pub const CTYPE3_SHIFT: usize = 6
Bit shift (i.e., the low bit) of ctype3.
Sourcepub const CTYPE2_MASK: u64
pub const CTYPE2_MASK: u64
Unshifted bitmask of ctype2.
Sourcepub const CTYPE2_SHIFT: usize = 3
pub const CTYPE2_SHIFT: usize = 3
Bit shift (i.e., the low bit) of ctype2.
Sourcepub const CTYPE1_MASK: u64
pub const CTYPE1_MASK: u64
Unshifted bitmask of ctype1.
Sourcepub const CTYPE1_SHIFT: usize = 0
pub const CTYPE1_SHIFT: usize = 0
Bit shift (i.e., the low bit) of ctype1.
Sourcepub const FIELDS: [FieldMetadata<u64>; 18]
pub const FIELDS: [FieldMetadata<u64>; 18]
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) -> u64
Sourcepub fn ttype7(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
pub fn ttype7(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
The value of CacheLevelIdRegister[46:45].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ttype7 to recover from invalid bit patterns.
Sourcepub fn try_ttype7(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
pub fn try_ttype7(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
Fallible variant of Self::ttype7.
Sourcepub fn set_ttype7(&mut self, value: TagCacheType) -> &mut Self
pub fn set_ttype7(&mut self, value: TagCacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[46:45].
Sourcepub fn ttype6(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
pub fn ttype6(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
The value of CacheLevelIdRegister[44:43].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ttype6 to recover from invalid bit patterns.
Sourcepub fn try_ttype6(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
pub fn try_ttype6(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
Fallible variant of Self::ttype6.
Sourcepub fn set_ttype6(&mut self, value: TagCacheType) -> &mut Self
pub fn set_ttype6(&mut self, value: TagCacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[44:43].
Sourcepub fn ttype5(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
pub fn ttype5(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
The value of CacheLevelIdRegister[42:41].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ttype5 to recover from invalid bit patterns.
Sourcepub fn try_ttype5(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
pub fn try_ttype5(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
Fallible variant of Self::ttype5.
Sourcepub fn set_ttype5(&mut self, value: TagCacheType) -> &mut Self
pub fn set_ttype5(&mut self, value: TagCacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[42:41].
Sourcepub fn ttype4(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
pub fn ttype4(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
The value of CacheLevelIdRegister[40:39].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ttype4 to recover from invalid bit patterns.
Sourcepub fn try_ttype4(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
pub fn try_ttype4(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
Fallible variant of Self::ttype4.
Sourcepub fn set_ttype4(&mut self, value: TagCacheType) -> &mut Self
pub fn set_ttype4(&mut self, value: TagCacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[40:39].
Sourcepub fn ttype3(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
pub fn ttype3(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
The value of CacheLevelIdRegister[38:37].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ttype3 to recover from invalid bit patterns.
Sourcepub fn try_ttype3(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
pub fn try_ttype3(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
Fallible variant of Self::ttype3.
Sourcepub fn set_ttype3(&mut self, value: TagCacheType) -> &mut Self
pub fn set_ttype3(&mut self, value: TagCacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[38:37].
Sourcepub fn ttype2(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
pub fn ttype2(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
The value of CacheLevelIdRegister[36:35].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ttype2 to recover from invalid bit patterns.
Sourcepub fn try_ttype2(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
pub fn try_ttype2(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
Fallible variant of Self::ttype2.
Sourcepub fn set_ttype2(&mut self, value: TagCacheType) -> &mut Self
pub fn set_ttype2(&mut self, value: TagCacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[36:35].
Sourcepub fn ttype1(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
pub fn ttype1(&self) -> TagCacheTypewhere
TagCacheType: TryFromBytes,
The value of CacheLevelIdRegister[34:33].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ttype1 to recover from invalid bit patterns.
Sourcepub fn try_ttype1(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
pub fn try_ttype1(&self) -> Result<TagCacheType, InvalidBits<u8>>where
TagCacheType: TryFromBytes,
Fallible variant of Self::ttype1.
Sourcepub fn set_ttype1(&mut self, value: TagCacheType) -> &mut Self
pub fn set_ttype1(&mut self, value: TagCacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[34:33].
Sourcepub const fn set_icb(&mut self, value: u8) -> &mut Self
pub const fn set_icb(&mut self, value: u8) -> &mut Self
Sets the value of CacheLevelIdRegister[32:30].
Sourcepub const fn set_lou_u(&mut self, value: u8) -> &mut Self
pub const fn set_lou_u(&mut self, value: u8) -> &mut Self
Sets the value of CacheLevelIdRegister[29:27].
Sourcepub const fn set_loc(&mut self, value: u8) -> &mut Self
pub const fn set_loc(&mut self, value: u8) -> &mut Self
Sets the value of CacheLevelIdRegister[26:24].
Sourcepub const fn set_lou_is(&mut self, value: u8) -> &mut Self
pub const fn set_lou_is(&mut self, value: u8) -> &mut Self
Sets the value of CacheLevelIdRegister[23:21].
Sourcepub fn ctype7(&self) -> CacheTypewhere
CacheType: TryFromBytes,
pub fn ctype7(&self) -> CacheTypewhere
CacheType: TryFromBytes,
The value of CacheLevelIdRegister[20:18].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ctype7 to recover from invalid bit patterns.
Sourcepub fn try_ctype7(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
pub fn try_ctype7(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
Fallible variant of Self::ctype7.
Sourcepub fn set_ctype7(&mut self, value: CacheType) -> &mut Self
pub fn set_ctype7(&mut self, value: CacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[20:18].
Sourcepub fn ctype6(&self) -> CacheTypewhere
CacheType: TryFromBytes,
pub fn ctype6(&self) -> CacheTypewhere
CacheType: TryFromBytes,
The value of CacheLevelIdRegister[17:15].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ctype6 to recover from invalid bit patterns.
Sourcepub fn try_ctype6(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
pub fn try_ctype6(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
Fallible variant of Self::ctype6.
Sourcepub fn set_ctype6(&mut self, value: CacheType) -> &mut Self
pub fn set_ctype6(&mut self, value: CacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[17:15].
Sourcepub fn ctype5(&self) -> CacheTypewhere
CacheType: TryFromBytes,
pub fn ctype5(&self) -> CacheTypewhere
CacheType: TryFromBytes,
The value of CacheLevelIdRegister[14:12].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ctype5 to recover from invalid bit patterns.
Sourcepub fn try_ctype5(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
pub fn try_ctype5(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
Fallible variant of Self::ctype5.
Sourcepub fn set_ctype5(&mut self, value: CacheType) -> &mut Self
pub fn set_ctype5(&mut self, value: CacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[14:12].
Sourcepub fn ctype4(&self) -> CacheTypewhere
CacheType: TryFromBytes,
pub fn ctype4(&self) -> CacheTypewhere
CacheType: TryFromBytes,
The value of CacheLevelIdRegister[11:9].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ctype4 to recover from invalid bit patterns.
Sourcepub fn try_ctype4(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
pub fn try_ctype4(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
Fallible variant of Self::ctype4.
Sourcepub fn set_ctype4(&mut self, value: CacheType) -> &mut Self
pub fn set_ctype4(&mut self, value: CacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[11:9].
Sourcepub fn ctype3(&self) -> CacheTypewhere
CacheType: TryFromBytes,
pub fn ctype3(&self) -> CacheTypewhere
CacheType: TryFromBytes,
The value of CacheLevelIdRegister[8:6].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ctype3 to recover from invalid bit patterns.
Sourcepub fn try_ctype3(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
pub fn try_ctype3(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
Fallible variant of Self::ctype3.
Sourcepub fn set_ctype3(&mut self, value: CacheType) -> &mut Self
pub fn set_ctype3(&mut self, value: CacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[8:6].
Sourcepub fn ctype2(&self) -> CacheTypewhere
CacheType: TryFromBytes,
pub fn ctype2(&self) -> CacheTypewhere
CacheType: TryFromBytes,
The value of CacheLevelIdRegister[5:3].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ctype2 to recover from invalid bit patterns.
Sourcepub fn try_ctype2(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
pub fn try_ctype2(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
Fallible variant of Self::ctype2.
Sourcepub fn set_ctype2(&mut self, value: CacheType) -> &mut Self
pub fn set_ctype2(&mut self, value: CacheType) -> &mut Self
Sets the value of CacheLevelIdRegister[5:3].
Sourcepub fn ctype1(&self) -> CacheTypewhere
CacheType: TryFromBytes,
pub fn ctype1(&self) -> CacheTypewhere
CacheType: TryFromBytes,
The value of CacheLevelIdRegister[2:0].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ctype1 to recover from invalid bit patterns.
Sourcepub fn try_ctype1(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
pub fn try_ctype1(&self) -> Result<CacheType, InvalidBits<u8>>where
CacheType: TryFromBytes,
Fallible variant of Self::ctype1.
Source§impl CacheLevelIdRegister
impl CacheLevelIdRegister
Sourcepub const MAX_LEVELS: usize = 7
pub const MAX_LEVELS: usize = 7
The number of cache levels described by the register.
Sourcepub fn cache_type(&self, level: usize) -> CacheType
pub fn cache_type(&self, level: usize) -> CacheType
Returns the type of cache at level, which is zero-based (L1 is level
0) to match the level field of CacheSizeSelectionRegister.
Panics if level is not below Self::MAX_LEVELS or the field holds
a reserved value.
Sourcepub fn tag_cache_type(&self, level: usize) -> TagCacheType
pub fn tag_cache_type(&self, level: usize) -> TagCacheType
Returns the type of allocation tag cache at level, which is
zero-based (L1 is level 0).
Panics if level is not below Self::MAX_LEVELS.
Trait Implementations§
Source§impl Binary for CacheLevelIdRegister
impl Binary for CacheLevelIdRegister
Source§impl Clone for CacheLevelIdRegister
impl Clone for CacheLevelIdRegister
Source§fn clone(&self) -> CacheLevelIdRegister
fn clone(&self) -> CacheLevelIdRegister
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CacheLevelIdRegister
Source§impl Debug for CacheLevelIdRegister
impl Debug for CacheLevelIdRegister
Source§impl Default for CacheLevelIdRegister
impl Default for CacheLevelIdRegister
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 CacheLevelIdRegister
Source§impl From<CacheLevelIdRegister> for u64
impl From<CacheLevelIdRegister> for u64
Source§fn from(value: CacheLevelIdRegister) -> Self
fn from(value: CacheLevelIdRegister) -> Self
Source§impl From<u64> for CacheLevelIdRegister
impl From<u64> for CacheLevelIdRegister
Source§impl IntoIterator for CacheLevelIdRegister
impl IntoIterator for CacheLevelIdRegister
Source§impl<'a> IntoIterator for &'a CacheLevelIdRegister
impl<'a> IntoIterator for &'a CacheLevelIdRegister
Source§impl LowerHex for CacheLevelIdRegister
impl LowerHex for CacheLevelIdRegister
Source§impl Octal for CacheLevelIdRegister
impl Octal for CacheLevelIdRegister
Source§impl PartialEq for CacheLevelIdRegister
impl PartialEq for CacheLevelIdRegister
impl StructuralPartialEq for CacheLevelIdRegister
Source§impl UpperHex for CacheLevelIdRegister
impl UpperHex for CacheLevelIdRegister
Auto Trait Implementations§
impl Freeze for CacheLevelIdRegister
impl RefUnwindSafe for CacheLevelIdRegister
impl Send for CacheLevelIdRegister
impl Sync for CacheLevelIdRegister
impl Unpin for CacheLevelIdRegister
impl UnsafeUnpin for CacheLevelIdRegister
impl UnwindSafe for CacheLevelIdRegister
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)