From 2f6ee01e9ebd2776d36e12bf93c11cefd4274a8e Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Tue, 5 Jul 2022 13:35:28 -0500 Subject: bsps/aarch64: Use MMU pages appropriately 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. --- bsps/aarch64/include/bsp/aarch64-mmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bsps/aarch64/include/bsp/aarch64-mmu.h') diff --git a/bsps/aarch64/include/bsp/aarch64-mmu.h b/bsps/aarch64/include/bsp/aarch64-mmu.h index 6e589cd6cd..bca7e0ce8d 100644 --- a/bsps/aarch64/include/bsp/aarch64-mmu.h +++ b/bsps/aarch64/include/bsp/aarch64-mmu.h @@ -145,8 +145,8 @@ BSP_START_TEXT_SECTION static inline rtems_status_code aarch64_mmu_page_table_alloc( uint64_t **page_table ) { /* First page table is already in use as TTB0 */ - static uintptr_t *current_page_table = - (uintptr_t *) bsp_translation_table_base; + static uintptr_t current_page_table = + (uintptr_t) bsp_translation_table_base; current_page_table += MMU_PAGE_SIZE; *page_table = (uint64_t *) current_page_table; -- cgit v1.2.3