diff --git a/arch/arm64/src/common/arm64_mmu.c b/arch/arm64/src/common/arm64_mmu.c index ec1bb1b98b..a2572850a1 100644 --- a/arch/arm64/src/common/arm64_mmu.c +++ b/arch/arm64/src/common/arm64_mmu.c @@ -707,10 +707,6 @@ void mmu_ln_setentry(uint32_t ptlevel, uintptr_t lnvaddr, uintptr_t paddr, index = XLAT_TABLE_VA_IDX(vaddr, ptlevel); - /* Setup the page descriptor and access flag */ - - mmuflags |= PTE_PAGE_DESC | PTE_BLOCK_DESC_AF; - /* Save it */ lntable[index] = (paddr | mmuflags); diff --git a/arch/arm64/src/common/arm64_mmu.h b/arch/arm64/src/common/arm64_mmu.h index a5c59791a8..1e95232f34 100644 --- a/arch/arm64/src/common/arm64_mmu.h +++ b/arch/arm64/src/common/arm64_mmu.h @@ -223,11 +223,11 @@ /* Flags for user page tables */ -#define MMU_UPGT_FLAGS (0) +#define MMU_UPGT_FLAGS (PTE_TABLE_DESC) /* Flags for normal memory region */ -#define MMU_MT_NORMAL_FLAGS (PTE_BLOCK_DESC_INNER_SHARE | PTE_BLOCK_DESC_MEMTYPE(MT_NORMAL)) +#define MMU_MT_NORMAL_FLAGS (PTE_PAGE_DESC | PTE_BLOCK_DESC_AF | PTE_BLOCK_DESC_INNER_SHARE | PTE_BLOCK_DESC_MEMTYPE(MT_NORMAL)) /* Flags for user FLASH (RX) and user RAM (RW) */ @@ -240,7 +240,7 @@ /* Flags for kernel page tables */ -#define MMU_KPGT_FLAGS (0) +#define MMU_KPGT_FLAGS (PTE_TABLE_DESC) /* Kernel FLASH and RAM are mapped globally */