|
Kernelite 0.1.0
Kernelite is a minimalist, educational operating system kernel built from scratch. The project aims to recreate core components of the Linux architecture to explore the fundamentals of operating system design and hardware-software interaction.
|
Memory Management Unit utilities. More...


Go to the source code of this file.
Data Structures | |
| struct | tcr_reg_t |
| TCR_EL1 — Translation Control Register, EL1. More... | |
Typedefs | |
| typedef struct tcr_reg_t | tcr_reg_t |
| TCR_EL1 — Translation Control Register, EL1. | |
Functions | |
| bool | enable_mmu (page_table_t *id_map_root, page_table_t *kernel_map_root) |
| Configure system registers and enable the AArch64 EL1 MMU. | |
Memory Management Unit utilities.
Provides architecture-specific mmu setup.
TCR_EL1 — Translation Control Register, EL1.
Controls the stage 1 translation regime for EL0 and EL1. TTBR0_EL1 governs the lower VA range [0, 2^(64-T0SZ)). TTBR1_EL1 governs the upper VA range [2^(64-T1SZ), 2^64).
Reference: ARMv8/ARMv9 ARM, section D19.2.131 TCR_EL1.
| bool enable_mmu | ( | page_table_t * | id_map_root, |
| page_table_t * | kernel_map_root | ||
| ) |
Configure system registers and enable the AArch64 EL1 MMU.
Performs the full MMU bring-up sequence in order:
id_map_root into TTBR0_EL1.kernel_map_root into TTBR1_EL1.| id_map_root | Pointer to the id_map_root (L0) page table whose physical address is loaded into TTBR0_EL1. Must not be NULL. |
| kernel_map_root | Pointer to the kernel_map_root (L1) page table whose physical address is loaded into TTBR1_EL1. Must not be NULL. |
id_map_root or kernel_map_root was NULL.