Skip to main content

El1

Struct El1 

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

EL1 stage-one translation and native exception registers.

Implementations§

Source§

impl El1

Source

pub unsafe fn init_trap()

Installs native EL1 vectors and removes the boot lower-address mapping.

§Safety

Execute at EL1 with IRQs masked, a valid kernel stack and kernel CPU anchor installed. No live mapping may depend on the boot TTBR0_EL1 root.

Source§

impl El1

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 El1

Source

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

Transfers from EL2 or EL3 to a non-secure AArch64 EL1 boot entry. Physical timer access is enabled and the virtual counter offset is zero.

§Safety

Execute at EL2/EL3 before admitting other owners of the lower register banks. Entry and its 16-byte-aligned exclusive stack must be accessible at EL1 with the currently installed translation state. Entry accepts its sole argument in x0. No live resource may need destruction on this stack.

Source§

impl El1

Source

pub fn flush_tlb(address: Option<VirtAddr>)

Invalidates an EL1 stage-one translation on this CPU, across all ASIDs.

Source§

impl El1

Source

pub fn read_kernel_page_table() -> PhysAddr

Returns the EL1 kernel’s TTBR1 base, excluding its ASID field.

Source

pub unsafe fn write_kernel_page_table(root: PhysAddr)

Replaces the EL1 kernel root without invalidating cached translations.

§Safety

The caller must retain the new tables and all current code, stack and data mappings at EL1, and perform required translation synchronization.

Source

pub fn address_space_tag_capacity() -> u32

Returns the configured EL1 ASID capacity.

Source

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

Invalidates all EL1 translations intersecting a local byte range.

Source§

impl El1

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 El1

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 El1

Source

pub fn flush_tlb_inner_shareable(address: Option<VirtAddr>)

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

Source§

impl El1

Source

pub fn read_kernel_address_space() -> HardwareAddressSpace

Reads the kernel TTBR1 base and ASID together.

Source

pub fn read_user_address_space() -> HardwareAddressSpace

Reads the lower-address TTBR0 base and ASID together.

Source

pub unsafe fn write_kernel_address_space(space: HardwareAddressSpace)

Installs a kernel TTBR1 root and ASID without implicit invalidation.

§Safety

The aligned root and supported ASID must remain owned while active. Current mappings must survive the write; the owner arranges TLB ordering.

Source

pub unsafe fn write_user_address_space(space: HardwareAddressSpace)

Installs a lower-address TTBR0 root and ASID without implicit invalidation.

§Safety

The aligned root and supported ASID must remain owned while active. No in-flight lower-address access may use the retired mapping.

Trait Implementations§

Source§

impl Clone for El1

Source§

fn clone(&self) -> El1

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 El1

Source§

impl Debug for El1

Source§

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

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

impl Default for El1

Source§

fn default() -> El1

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

impl Stage1Regime for El1

Source§

const EL2: bool = false

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

Auto Trait Implementations§

§

impl Freeze for El1

§

impl RefUnwindSafe for El1

§

impl Send for El1

§

impl Sync for El1

§

impl Unpin for El1

§

impl UnsafeUnpin for El1

§

impl UnwindSafe for El1

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.