Skip to main content

El2

Struct El2 

Source
pub struct El2;
Available on AArch64 only.
Expand description

Non-VHE EL2 stage-one translation and native exception registers. Guest stage-two translation is a separate VTTBR/VTCR capability.

Implementations§

Source§

impl El2

Source

pub unsafe fn init_trap()

Installs native non-VHE EL2 vectors without modifying a guest EL1 bank.

§Safety

Execute at non-VHE EL2 with IRQs masked and a valid kernel stack and CPU anchor installed. The mapped CPU vector text must remain executable.

Source§

impl El2

Source

pub unsafe fn init_boot_trap()

Installs the early vector using the boot owner’s exception policy.

§Safety

Execute at the corresponding EL with a valid stack and IRQs masked. The vector and boot handler must remain mapped and callable; runtime TLS and CPU-local services need not be initialized.

Source

pub fn vector_base() -> VirtAddr

Reads the currently installed vector base for this exception level.

Source§

impl El2

Source

pub unsafe fn enter(entry: VirtAddr, stack: VirtAddr, argument: usize) -> !

Transfers from EL3 to a non-secure AArch64 EL2 boot entry with IRQs masked.

§Safety

Execute at EL3 with exclusive ownership of the lower exception registers. Entry and its 16-byte-aligned exclusive stack must be accessible at EL2; entry accepts its argument in x0. No live stack resource needs destruction.

Source§

impl El2

Source

pub fn flush_tlb(address: Option<VirtAddr>)

Invalidates a non-VHE EL2 stage-one translation on this CPU. This does not invalidate guest stage-two translations.

Source§

impl El2

Source

pub fn read_kernel_page_table() -> PhysAddr

Returns the non-VHE EL2 kernel’s TTBR0 base.

Source

pub unsafe fn write_kernel_page_table(root: PhysAddr)

Replaces the non-VHE EL2 stage-one root without invalidation.

§Safety

The caller must retain the tables and all active EL2 code, stack and data mappings and perform required translation synchronization.

Source

pub const fn address_space_tag_capacity() -> u32

Non-VHE EL2 native translations have no userspace ASID allocation.

Source

pub fn flush_tlb_range(start: VirtAddr, size: usize)

Invalidates all non-VHE EL2 translations intersecting a local byte range.

Source§

impl El2

Source

pub unsafe fn configure_stage1(mair: u64)

Programs the existing four-level, 4-KiB stage-one geometry and MAIR.

§Safety

The caller must own this CPU with IRQs masked before enabling this translation regime. Existing translations must not depend on the old configuration. MAIR slots must agree with every installed descriptor.

Source§

impl El2

Source

pub fn is_mmu_enabled() -> bool

Returns whether this translation regime’s MMU is enabled.

Source

pub unsafe fn enable_mmu_and_caches()

Enables translation and native cache access for this regime.

§Safety

Valid roots, MAIR and geometry must be installed. The new mappings must retain current code, stack and data until the owner’s next handoff.

Source§

impl El2

Source

pub fn flush_tlb_inner_shareable(address: Option<VirtAddr>)

Invalidates stage-one translations throughout the inner-shareable domain.

Trait Implementations§

Source§

impl Clone for El2

Source§

fn clone(&self) -> El2

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

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

Performs copy-assignment from source. Read more
Source§

impl Copy for El2

Source§

impl Debug for El2

Source§

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

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

impl Default for El2

Source§

fn default() -> El2

Returns the “default value” for a type. Read more
Source§

impl Stage1Regime for El2

Source§

const EL2: bool = true

Available on AArch64 only.
Whether the descriptor belongs to the non-VHE EL2 regime.

Auto Trait Implementations§

§

impl Freeze for El2

§

impl RefUnwindSafe for El2

§

impl Send for El2

§

impl Sync for El2

§

impl Unpin for El2

§

impl UnsafeUnpin for El2

§

impl UnwindSafe for El2

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

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

Performs the conversion.
Source§

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

Source§

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.