summaryrefslogtreecommitdiffstats
path: root/bsps/aarch64/include/bsp/aarch64-mmu.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bsps/aarch64: Disable use of TTBR1Tian Ye2023-10-181-1/+2
| | | | | | | Force use of addresses that would be translated by TTBR1 to cause a translation fault. RTEMS on AArch64 does not use TTBR1 and so attempted translation of that address range could cause unexpected behavior in the form of other exception types since TTBR1 is never set.
* bsps/aarch64: Flush cache before disabling MMUKinsey Moore2023-02-141-1/+7
| | | | | | To ensure data consistency, the cache much be flushed before disabling the MMU. When the MMU is disabled, all accesses are treated as non-cachced and thus will bypass the cache.
* aarch64/mmu: Prevent block descriptors at level -1Kinsey Moore2022-11-171-10/+13
| | | | | | | | | In the original implementation, level -1 was unused and all levels could have block-like descriptors (level 2 block descriptors are called page descriptors). When support for level -1 page tables was added the constraint on level -1 block descriptors was not honored. This prevents block descriptors from being mapped at level -1 since the hardware will not map them properly.
* aarch64: Use page table level 0Kinsey Moore2022-07-211-14/+51
| | | | | | | | | This alters the AArch64 page table generation and mapping code and MMU configuration to use page table level 0 in addition to levels 1, 2, and 3. This allows the mapping of up to 48 bits of memory space and is the maximum that can be mapped without relying on additional processor extensions. Mappings are restricted based on the number of physical address bits that the CPU supports.
* aarch64: Memory map the noinit sectionKinsey Moore2022-07-181-0/+4
| | | | | This section was added recently and must be mapped to be accessed without generating an exception.
* bsps/aarch64: Use MMU pages appropriatelyKinsey Moore2022-07-061-2/+2
| | | | | | | | | There were two bugs with MMU page use that were partially hiding each other. The linker script page table section was 4x the size it needed to be and the page table allocation routine was allocating pages PTRSIZE times larger than it needed to. On ILP32, this resulted in incorrect but functional allocation. On LP64, this resulted in allocation failures earlier than expected.
* bsp/aarch64: Flush the cache before invalidating itChris Johns2022-06-161-1/+2
| | | | | - Any page tables need to be flushed if the cache is enabled. Disabling the cache may only be available in secure mode.
* cpukit/aarch64: Add libdebugger supportKinsey Moore2021-11-011-0/+11
| | | | | | This adds support for libdebugger under AArch64 using software breakpoints and the single-step execution mode present in all AArch64 CPUs.
* bsps/aarch64: Add missing MMU map recursion checkKinsey Moore2021-11-011-0/+9
| | | | | | | Certain input parameters for MMU mapping operations could cause an infinite recursion if block end boundaries didn't align to 4k. This ensures that recursion descent does not exceed 2 levels and instead rounds up to the nearest 4k block if necessary.
* aarch64: Break out MMU definitionsKinsey Moore2021-11-011-39/+1
| | | | | | This moves the AArch64 MMU memory type definitions into cpukit for use by libdebugger since remapping of memory is required to insert software breakpoints.
* cpukit: Add AArch64 SMP SupportKinsey Moore2021-09-211-8/+5
| | | | This adds SMP support for AArch64 in cpukit and for the ZynqMP BSPs.
* bsps/aarch64: Add MMU driver to relax alignmentKinsey Moore2021-05-271-0/+426
Currently, the AArch64 BSPs have a hard time running on real hardware without building the toolchain and the bsps with -mstrict-align in multiple places. Configuring the MMU on these chips allows for unaligned memory accesses for non-device memory which avoids requiring strict alignment in the toolchain and in the BSPs themselves. In writing this driver, it was found that the synchronous exception handling code needed to be rewritten since it relied on clearing SCTLR_EL1 to avoid thread stack misalignments in RTEMS_DEBUG mode. This is now avoided by exactly preserving thread mode stack and flags and the new implementation is compatible with the draft information provided on the mailing list covering the Exception Management API.