[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:
Michael Ryleev
2015-05-27 12:09:51 -07:00
committed by Travis Geiselbrecht
parent c22c230c63
commit 42705b9f0e

View File

@@ -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: