[arch][arm][mmu] Fix a bug in arch_mmu_query
When query small page we should check MMU_MEMORY_L1_PAGETABLE_NON_SECURE bit in order to determine if we have non-secure memory. Change-Id: I59e633b986a50c44e417d17b59bb9cd7eeb20612
This commit is contained in:
committed by
Travis Geiselbrecht
parent
c22c230c63
commit
42705b9f0e
@@ -278,7 +278,7 @@ status_t arch_mmu_query(vaddr_t vaddr, paddr_t *paddr, uint *flags)
|
||||
if (flags) {
|
||||
*flags = 0;
|
||||
/* NS flag is only present on L1 entry */
|
||||
if (tt_entry & MMU_MEMORY_L1_SECTION_NON_SECURE)
|
||||
if (tt_entry & MMU_MEMORY_L1_PAGETABLE_NON_SECURE)
|
||||
*flags |= ARCH_MMU_FLAG_NS;
|
||||
switch (l2_entry & MMU_MEMORY_L2_TYPE_MASK) {
|
||||
case MMU_MEMORY_L2_TYPE_STRONGLY_ORDERED:
|
||||
|
||||
Reference in New Issue
Block a user