pub struct Mpidr {
pub aff0: u8,
pub aff1: u8,
pub aff2: u8,
pub aff3: Option<u8>,
}
Expand description
The type contains the affinity fields of the MPIDR register. For AArch32 callers this contains Affinity 0, 1, 2 fields and for AAarch64 callers it has Affinity 0, 1, 2, 3 fields.
Fields§
§aff0: u8
§aff1: u8
§aff2: u8
§aff3: Option<u8>
Implementations§
Source§impl Mpidr
impl Mpidr
Sourcepub const fn from_aff3210(aff3: u8, aff2: u8, aff1: u8, aff0: u8) -> Self
pub const fn from_aff3210(aff3: u8, aff2: u8, aff1: u8, aff0: u8) -> Self
Create Mpidr instance from aff3-0 values
Sourcepub const fn from_aff210(aff2: u8, aff1: u8, aff0: u8) -> Self
pub const fn from_aff210(aff2: u8, aff1: u8, aff0: u8) -> Self
Create Mpidr instance from aff2-0 values
Sourcepub fn from_register_value(mpidr_el1: u64) -> Self
pub fn from_register_value(mpidr_el1: u64) -> Self
The MPIDR_EL1
register contains bits other then the aff3-0 fields. However the PSCI
specification request bits[40:63] and bits[24:31] to be set to zero when forwarding an
MPIDR value as an argument of a PSCI function call. Because of this, the TryFrom
implementation returns an error if these bits are set. In other cases the Mpidr
value is
constructed from the MPIDR_EL1
register value of the local core. This function does this
by ignoring other bits. Do not use this function for creating Mpidr
instance from a PSCI
function argument.