Crate memory_aarch64
source ·Expand description
This crate implements the virtual memory subsystem interfaces for Theseus on aarch64.
memory
uses this crate to get the memory layout and do other arch-specific operations on aarch64.
This is the top-level arch-specific memory crate. All arch-specific definitions for memory system are exported from this crate.
Re-exports
pub use tlb_flush_by_theseus_asid as tlb_flush_all;
Macros
- Configures the MMU based on the pointer to a MmuConfig, in x2. This function makes use of x3 too. If the MMU was enabled on the origin core, it will be enabled by this on the target core.
Structs
- The address bounds and flags of the initial kernel sections that need mapping.
- See
read_mmu_config
- The address bounds and mapping flags of a section’s memory region.
Functions
- Configures paging for Theseus.
- Disable the MMU using aarch64 registers
- Enable the MMU using aarch64 registers
- Finds the addresses in memory of the main kernel sections, as specified by the given boot information.
- Returns the current top-level page table address.
- Reads the current MMU configuration of the current CPU core, including the following system registers:
- Sets the given
page_table
as active by updating the TTBR0 register. - Flushes all TLB entries with Theseus’ ASID (=0).
- Flushes the specific virtual address in TLB.