arm64_mmu: Do not set accessed-flag for table descriptors
The 12:0 bits in table descriptors are RES0 and AF is the 10th bit, so it is not valid to set it in this case. Fix this by moving AF to the common MMU_MT_NORMAL_FLAGS field
This commit is contained in:
parent
00c4da73b3
commit
fbc796cff1
|
@ -707,10 +707,6 @@ void mmu_ln_setentry(uint32_t ptlevel, uintptr_t lnvaddr, uintptr_t paddr,
|
||||||
|
|
||||||
index = XLAT_TABLE_VA_IDX(vaddr, ptlevel);
|
index = XLAT_TABLE_VA_IDX(vaddr, ptlevel);
|
||||||
|
|
||||||
/* Setup the page descriptor and access flag */
|
|
||||||
|
|
||||||
mmuflags |= PTE_PAGE_DESC | PTE_BLOCK_DESC_AF;
|
|
||||||
|
|
||||||
/* Save it */
|
/* Save it */
|
||||||
|
|
||||||
lntable[index] = (paddr | mmuflags);
|
lntable[index] = (paddr | mmuflags);
|
||||||
|
|
|
@ -223,11 +223,11 @@
|
||||||
|
|
||||||
/* Flags for user page tables */
|
/* Flags for user page tables */
|
||||||
|
|
||||||
#define MMU_UPGT_FLAGS (0)
|
#define MMU_UPGT_FLAGS (PTE_TABLE_DESC)
|
||||||
|
|
||||||
/* Flags for normal memory region */
|
/* 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) */
|
/* Flags for user FLASH (RX) and user RAM (RW) */
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@
|
||||||
|
|
||||||
/* Flags for kernel page tables */
|
/* Flags for kernel page tables */
|
||||||
|
|
||||||
#define MMU_KPGT_FLAGS (0)
|
#define MMU_KPGT_FLAGS (PTE_TABLE_DESC)
|
||||||
|
|
||||||
/* Kernel FLASH and RAM are mapped globally */
|
/* Kernel FLASH and RAM are mapped globally */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue