pub struct CacheTypeRegister(/* private fields */);Expand description
The layout of CTR_EL0.
Implementations§
Source§impl CacheTypeRegister
impl CacheTypeRegister
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 TMIN_LINE_MASK: u64
pub const TMIN_LINE_MASK: u64
Unshifted bitmask of tmin_line.
Sourcepub const TMIN_LINE_SHIFT: usize = 32
pub const TMIN_LINE_SHIFT: usize = 32
Bit shift (i.e., the low bit) of tmin_line.
Sourcepub const DMIN_LINE_MASK: u64
pub const DMIN_LINE_MASK: u64
Unshifted bitmask of dmin_line.
Sourcepub const DMIN_LINE_SHIFT: usize = 16
pub const DMIN_LINE_SHIFT: usize = 16
Bit shift (i.e., the low bit) of dmin_line.
Sourcepub const L1_IP_MASK: u64
pub const L1_IP_MASK: u64
Unshifted bitmask of l1_ip.
Sourcepub const L1_IP_SHIFT: usize = 14
pub const L1_IP_SHIFT: usize = 14
Bit shift (i.e., the low bit) of l1_ip.
Sourcepub const IMIN_LINE_MASK: u64
pub const IMIN_LINE_MASK: u64
Unshifted bitmask of imin_line.
Sourcepub const IMIN_LINE_SHIFT: usize = 0
pub const IMIN_LINE_SHIFT: usize = 0
Bit shift (i.e., the low bit) of imin_line.
Sourcepub const FIELDS: [FieldMetadata<u64>; 8]
pub const FIELDS: [FieldMetadata<u64>; 8]
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 const fn set_tmin_line(&mut self, value: u8) -> &mut Self
pub const fn set_tmin_line(&mut self, value: u8) -> &mut Self
Sets the value of CacheTypeRegister[37:32].
Sourcepub const fn set_dic(&mut self, value: bool) -> &mut Self
pub const fn set_dic(&mut self, value: bool) -> &mut Self
Sets the value of CacheTypeRegister29.
Sourcepub const fn set_idc(&mut self, value: bool) -> &mut Self
pub const fn set_idc(&mut self, value: bool) -> &mut Self
Sets the value of CacheTypeRegister28.
Sourcepub const fn set_cwg(&mut self, value: u8) -> &mut Self
pub const fn set_cwg(&mut self, value: u8) -> &mut Self
Sets the value of CacheTypeRegister[27:24].
Sourcepub const fn set_erg(&mut self, value: u8) -> &mut Self
pub const fn set_erg(&mut self, value: u8) -> &mut Self
Sets the value of CacheTypeRegister[23:20].
Sourcepub const fn dmin_line(&self) -> u8
pub const fn dmin_line(&self) -> u8
log2 of the number of words in the smallest data cache line.
The value of CacheTypeRegister[19:16].
Sourcepub const fn set_dmin_line(&mut self, value: u8) -> &mut Self
pub const fn set_dmin_line(&mut self, value: u8) -> &mut Self
Sets the value of CacheTypeRegister[19:16].
Sourcepub fn l1_ip(&self) -> L1ICachePolicywhere
L1ICachePolicy: TryFromBytes,
pub fn l1_ip(&self) -> L1ICachePolicywhere
L1ICachePolicy: TryFromBytes,
The value of CacheTypeRegister[15:14].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_l1_ip to recover from invalid bit patterns.
Sourcepub fn try_l1_ip(&self) -> Result<L1ICachePolicy, InvalidBits<u8>>where
L1ICachePolicy: TryFromBytes,
pub fn try_l1_ip(&self) -> Result<L1ICachePolicy, InvalidBits<u8>>where
L1ICachePolicy: TryFromBytes,
Fallible variant of Self::l1_ip.
Sourcepub fn set_l1_ip(&mut self, value: L1ICachePolicy) -> &mut Self
pub fn set_l1_ip(&mut self, value: L1ICachePolicy) -> &mut Self
Sets the value of CacheTypeRegister[15:14].
Sourcepub const fn imin_line(&self) -> u8
pub const fn imin_line(&self) -> u8
log2 of the number of words in the smallest instruction cache line.
The value of CacheTypeRegister[3:0].
Sourcepub const fn set_imin_line(&mut self, value: u8) -> &mut Self
pub const fn set_imin_line(&mut self, value: u8) -> &mut Self
Sets the value of CacheTypeRegister[3:0].
Source§impl CacheTypeRegister
impl CacheTypeRegister
Sourcepub const fn dcache_line_size(&self) -> usize
pub const fn dcache_line_size(&self) -> usize
Returns the smallest data cache line size in bytes.
Sourcepub const fn icache_line_size(&self) -> usize
pub const fn icache_line_size(&self) -> usize
Returns the smallest instruction cache line size in bytes.
Trait Implementations§
Source§impl Binary for CacheTypeRegister
impl Binary for CacheTypeRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
Source§impl Clone for CacheTypeRegister
impl Clone for CacheTypeRegister
Source§fn clone(&self) -> CacheTypeRegister
fn clone(&self) -> CacheTypeRegister
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CacheTypeRegister
Source§impl Debug for CacheTypeRegister
impl Debug for CacheTypeRegister
Source§impl Default for CacheTypeRegister
impl Default for CacheTypeRegister
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 CacheTypeRegister
Source§impl From<CacheTypeRegister> for u64
impl From<CacheTypeRegister> for u64
Source§fn from(value: CacheTypeRegister) -> Self
fn from(value: CacheTypeRegister) -> Self
Source§impl From<u64> for CacheTypeRegister
impl From<u64> for CacheTypeRegister
Source§impl IntoIterator for CacheTypeRegister
impl IntoIterator for CacheTypeRegister
Source§impl<'a> IntoIterator for &'a CacheTypeRegister
impl<'a> IntoIterator for &'a CacheTypeRegister
Source§impl LowerHex for CacheTypeRegister
impl LowerHex for CacheTypeRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
Source§impl Octal for CacheTypeRegister
impl Octal for CacheTypeRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
Source§impl PartialEq for CacheTypeRegister
impl PartialEq for CacheTypeRegister
impl StructuralPartialEq for CacheTypeRegister
Source§impl UpperHex for CacheTypeRegister
impl UpperHex for CacheTypeRegister
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
L1ICachePolicy: Debug,
Auto Trait Implementations§
impl Freeze for CacheTypeRegister
impl RefUnwindSafe for CacheTypeRegister
impl Send for CacheTypeRegister
impl Sync for CacheTypeRegister
impl Unpin for CacheTypeRegister
impl UnsafeUnpin for CacheTypeRegister
impl UnwindSafe for CacheTypeRegister
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)