#[repr(C)]
pub struct S2TTE(pub u64);

Tuple Fields§

§0: u64

Implementations§

source§

impl S2TTE

source

pub fn new(data: u64) -> S2TTE

source

pub fn get_mut(&mut self) -> &mut Self

source

pub fn get(&self) -> u64

source

pub fn get_masked(&self, mask: u64) -> u64

source

pub fn get_masked_value(&self, mask: u64) -> u64

source

pub fn set(&mut self, val: u64) -> &mut Self

source

pub fn set_masked(&mut self, mask: u64, val: u64) -> &mut Self

source

pub fn set_masked_value(&mut self, mask: u64, val: u64) -> &mut Self

source

pub fn set_bits(&mut self, mask: u64) -> &mut Self

source

pub fn clear_bits(&mut self, mask: u64) -> &mut Self

source

pub const NS: u64 = 36_028_797_018_963_968u64

source

pub const XN: u64 = 18_014_398_509_481_984u64

source

pub const ADDR_L0_PAGE: u64 = 280_925_220_896_768u64

source

pub const ADDR_L1_PAGE: u64 = 281_473_902_968_832u64

source

pub const ADDR_L2_PAGE: u64 = 281_474_974_613_504u64

source

pub const ADDR_L3_PAGE: u64 = 281_474_976_706_560u64

source

pub const ADDR_FULL: u64 = 72_057_594_037_923_840u64

source

pub const AF: u64 = 1_024u64

source

pub const SH: u64 = 768u64

source

pub const AP: u64 = 192u64

source

pub const INVALID_RIPAS: u64 = 64u64

source

pub const INVALID_HIPAS: u64 = 60u64

source

pub const MEMATTR: u64 = 60u64

source

pub const DESC_TYPE: u64 = 3u64

source

pub const PAGE_FLAGS: u64 = 4_095u64

source§

impl S2TTE

source

pub fn get_s2tte( rd: &Rd, ipa: usize, level: usize, error_code: Error ) -> Result<(S2TTE, usize), Error>

source

pub fn is_valid(&self, level: usize, is_ns: bool) -> bool

source

pub fn is_host_ns_valid(&self, level: usize) -> bool

source

pub fn is_unassigned(&self) -> bool

source

pub fn is_destroyed(&self) -> bool

source

pub fn is_assigned(&self) -> bool

source

pub fn is_table(&self, level: usize) -> bool

source

pub fn is_invalid_ripas(&self) -> bool

source

pub fn address(&self, level: usize) -> Option<PhysAddr>

source

pub fn get_ripas(&self) -> u64

Trait Implementations§

source§

impl Clone for S2TTE

source§

fn clone(&self) -> S2TTE

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl From<usize> for S2TTE

source§

fn from(val: usize) -> Self

Converts to this type from the input type.
source§

impl Copy for S2TTE

Auto Trait Implementations§

§

impl RefUnwindSafe for S2TTE

§

impl Send for S2TTE

§

impl Sync for S2TTE

§

impl Unpin for S2TTE

§

impl UnwindSafe for S2TTE

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

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<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

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

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

Performs the conversion.