Skip to main content

CacheLevelIdRegister

Struct CacheLevelIdRegister 

Source
pub struct CacheLevelIdRegister(/* private fields */);
Expand description

The layout of CLIDR_EL1.

Implementations§

Source§

impl CacheLevelIdRegister

Source

pub const RSVD1_MASK: u64

Mask of all reserved-as-1 bits.

Source

pub const RSVD0_MASK: u64

Mask of all reserved-as-0 bits.

Source

pub const DEFAULT: u64

The default value of the layout, combining all field defaults and reserved-as values.

Source

pub const TTYPE7_MASK: u64

Unshifted bitmask of ttype7.

Source

pub const TTYPE7_SHIFT: usize = 45

Bit shift (i.e., the low bit) of ttype7.

Source

pub const TTYPE6_MASK: u64

Unshifted bitmask of ttype6.

Source

pub const TTYPE6_SHIFT: usize = 43

Bit shift (i.e., the low bit) of ttype6.

Source

pub const TTYPE5_MASK: u64

Unshifted bitmask of ttype5.

Source

pub const TTYPE5_SHIFT: usize = 41

Bit shift (i.e., the low bit) of ttype5.

Source

pub const TTYPE4_MASK: u64

Unshifted bitmask of ttype4.

Source

pub const TTYPE4_SHIFT: usize = 39

Bit shift (i.e., the low bit) of ttype4.

Source

pub const TTYPE3_MASK: u64

Unshifted bitmask of ttype3.

Source

pub const TTYPE3_SHIFT: usize = 37

Bit shift (i.e., the low bit) of ttype3.

Source

pub const TTYPE2_MASK: u64

Unshifted bitmask of ttype2.

Source

pub const TTYPE2_SHIFT: usize = 35

Bit shift (i.e., the low bit) of ttype2.

Source

pub const TTYPE1_MASK: u64

Unshifted bitmask of ttype1.

Source

pub const TTYPE1_SHIFT: usize = 33

Bit shift (i.e., the low bit) of ttype1.

Source

pub const ICB_MASK: u64

Unshifted bitmask of icb.

Source

pub const ICB_SHIFT: usize = 30

Bit shift (i.e., the low bit) of icb.

Source

pub const LOU_U_MASK: u64

Unshifted bitmask of lou_u.

Source

pub const LOU_U_SHIFT: usize = 27

Bit shift (i.e., the low bit) of lou_u.

Source

pub const LOC_MASK: u64

Unshifted bitmask of loc.

Source

pub const LOC_SHIFT: usize = 24

Bit shift (i.e., the low bit) of loc.

Source

pub const LOU_IS_MASK: u64

Unshifted bitmask of lou_is.

Source

pub const LOU_IS_SHIFT: usize = 21

Bit shift (i.e., the low bit) of lou_is.

Source

pub const CTYPE7_MASK: u64

Unshifted bitmask of ctype7.

Source

pub const CTYPE7_SHIFT: usize = 18

Bit shift (i.e., the low bit) of ctype7.

Source

pub const CTYPE6_MASK: u64

Unshifted bitmask of ctype6.

Source

pub const CTYPE6_SHIFT: usize = 15

Bit shift (i.e., the low bit) of ctype6.

Source

pub const CTYPE5_MASK: u64

Unshifted bitmask of ctype5.

Source

pub const CTYPE5_SHIFT: usize = 12

Bit shift (i.e., the low bit) of ctype5.

Source

pub const CTYPE4_MASK: u64

Unshifted bitmask of ctype4.

Source

pub const CTYPE4_SHIFT: usize = 9

Bit shift (i.e., the low bit) of ctype4.

Source

pub const CTYPE3_MASK: u64

Unshifted bitmask of ctype3.

Source

pub const CTYPE3_SHIFT: usize = 6

Bit shift (i.e., the low bit) of ctype3.

Source

pub const CTYPE2_MASK: u64

Unshifted bitmask of ctype2.

Source

pub const CTYPE2_SHIFT: usize = 3

Bit shift (i.e., the low bit) of ctype2.

Source

pub const CTYPE1_MASK: u64

Unshifted bitmask of ctype1.

Source

pub const CTYPE1_SHIFT: usize = 0

Bit shift (i.e., the low bit) of ctype1.

Source

pub const FIELDS: [FieldMetadata<u64>; 18]

Metadata of all named fields in the layout.

Source

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).

Source

pub const fn bits(self) -> u64

Source

pub fn ttype7(&self) -> TagCacheType

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.

Source

pub fn try_ttype7(&self) -> Result<TagCacheType, InvalidBits<u8>>

Fallible variant of Self::ttype7.

Source

pub fn set_ttype7(&mut self, value: TagCacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[46:45].

Source

pub fn ttype6(&self) -> TagCacheType

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.

Source

pub fn try_ttype6(&self) -> Result<TagCacheType, InvalidBits<u8>>

Fallible variant of Self::ttype6.

Source

pub fn set_ttype6(&mut self, value: TagCacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[44:43].

Source

pub fn ttype5(&self) -> TagCacheType

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.

Source

pub fn try_ttype5(&self) -> Result<TagCacheType, InvalidBits<u8>>

Fallible variant of Self::ttype5.

Source

pub fn set_ttype5(&mut self, value: TagCacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[42:41].

Source

pub fn ttype4(&self) -> TagCacheType

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.

Source

pub fn try_ttype4(&self) -> Result<TagCacheType, InvalidBits<u8>>

Fallible variant of Self::ttype4.

Source

pub fn set_ttype4(&mut self, value: TagCacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[40:39].

Source

pub fn ttype3(&self) -> TagCacheType

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.

Source

pub fn try_ttype3(&self) -> Result<TagCacheType, InvalidBits<u8>>

Fallible variant of Self::ttype3.

Source

pub fn set_ttype3(&mut self, value: TagCacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[38:37].

Source

pub fn ttype2(&self) -> TagCacheType

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.

Source

pub fn try_ttype2(&self) -> Result<TagCacheType, InvalidBits<u8>>

Fallible variant of Self::ttype2.

Source

pub fn set_ttype2(&mut self, value: TagCacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[36:35].

Source

pub fn ttype1(&self) -> TagCacheType

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.

Source

pub fn try_ttype1(&self) -> Result<TagCacheType, InvalidBits<u8>>

Fallible variant of Self::ttype1.

Source

pub fn set_ttype1(&mut self, value: TagCacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[34:33].

Source

pub const fn icb(&self) -> u8

The value of CacheLevelIdRegister[32:30].

Source

pub const fn set_icb(&mut self, value: u8) -> &mut Self

Sets the value of CacheLevelIdRegister[32:30].

Source

pub const fn lou_u(&self) -> u8

The value of CacheLevelIdRegister[29:27].

Source

pub const fn set_lou_u(&mut self, value: u8) -> &mut Self

Sets the value of CacheLevelIdRegister[29:27].

Source

pub const fn loc(&self) -> u8

The value of CacheLevelIdRegister[26:24].

Source

pub const fn set_loc(&mut self, value: u8) -> &mut Self

Sets the value of CacheLevelIdRegister[26:24].

Source

pub const fn lou_is(&self) -> u8

The value of CacheLevelIdRegister[23:21].

Source

pub const fn set_lou_is(&mut self, value: u8) -> &mut Self

Sets the value of CacheLevelIdRegister[23:21].

Source

pub fn ctype7(&self) -> CacheType

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.

Source

pub fn try_ctype7(&self) -> Result<CacheType, InvalidBits<u8>>

Fallible variant of Self::ctype7.

Source

pub fn set_ctype7(&mut self, value: CacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[20:18].

Source

pub fn ctype6(&self) -> CacheType

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.

Source

pub fn try_ctype6(&self) -> Result<CacheType, InvalidBits<u8>>

Fallible variant of Self::ctype6.

Source

pub fn set_ctype6(&mut self, value: CacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[17:15].

Source

pub fn ctype5(&self) -> CacheType

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.

Source

pub fn try_ctype5(&self) -> Result<CacheType, InvalidBits<u8>>

Fallible variant of Self::ctype5.

Source

pub fn set_ctype5(&mut self, value: CacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[14:12].

Source

pub fn ctype4(&self) -> CacheType

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.

Source

pub fn try_ctype4(&self) -> Result<CacheType, InvalidBits<u8>>

Fallible variant of Self::ctype4.

Source

pub fn set_ctype4(&mut self, value: CacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[11:9].

Source

pub fn ctype3(&self) -> CacheType

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.

Source

pub fn try_ctype3(&self) -> Result<CacheType, InvalidBits<u8>>

Fallible variant of Self::ctype3.

Source

pub fn set_ctype3(&mut self, value: CacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[8:6].

Source

pub fn ctype2(&self) -> CacheType

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.

Source

pub fn try_ctype2(&self) -> Result<CacheType, InvalidBits<u8>>

Fallible variant of Self::ctype2.

Source

pub fn set_ctype2(&mut self, value: CacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[5:3].

Source

pub fn ctype1(&self) -> CacheType

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.

Source

pub fn try_ctype1(&self) -> Result<CacheType, InvalidBits<u8>>

Fallible variant of Self::ctype1.

Source

pub fn set_ctype1(&mut self, value: CacheType) -> &mut Self

Sets the value of CacheLevelIdRegister[2:0].

Source§

impl CacheLevelIdRegister

Source

pub fn iter(&self) -> CacheLevelIdRegisterIter

Returns an iterator over (metadata, value) pairs for each field.

Source§

impl CacheLevelIdRegister

Source

pub const MAX_LEVELS: usize = 7

The number of cache levels described by the register.

Source

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.

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where TagCacheType: Debug, CacheType: Debug,

Formats the value using the given formatter. Read more
Source§

impl Clone for CacheLevelIdRegister

Source§

fn clone(&self) -> CacheLevelIdRegister

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CacheLevelIdRegister

Source§

impl Debug for CacheLevelIdRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CacheLevelIdRegister

Source§

fn default() -> Self

Returns an instance with the default bits set (i.e,. with a value of Self::DEFAULT.

Source§

impl Eq for CacheLevelIdRegister

Source§

impl From<CacheLevelIdRegister> for u64

Source§

fn from(value: CacheLevelIdRegister) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for CacheLevelIdRegister

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl IntoIterator for CacheLevelIdRegister

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = CacheLevelIdRegisterIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoIterator for &'a CacheLevelIdRegister

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = CacheLevelIdRegisterIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for CacheLevelIdRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where TagCacheType: Debug, CacheType: Debug,

Formats the value using the given formatter. Read more
Source§

impl Octal for CacheLevelIdRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where TagCacheType: Debug, CacheType: Debug,

Formats the value using the given formatter. Read more
Source§

impl PartialEq for CacheLevelIdRegister

Source§

fn eq(&self, other: &CacheLevelIdRegister) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CacheLevelIdRegister

Source§

impl UpperHex for CacheLevelIdRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result
where TagCacheType: Debug, CacheType: Debug,

Formats the value using the given formatter. Read more

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 T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<Layout, Base> LayoutOver<Base> for Layout
where Layout: Copy + From<Base> + Into<Base>,

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.