]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
armv8: mmu: teach the pagetable dumper to show explicit FAULT maps
authorCasey Connolly <casey.connolly@linaro.org>
Mon, 8 Jun 2026 17:13:49 +0000 (19:13 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 17 Jun 2026 15:55:00 +0000 (09:55 -0600)
When a region is explicitly unmapped (like with
mmu_change_region_attr(.... PTE_TYPE_FAULT)) the address translation
still remains but won't be used since the region is marked invalid.
Print these regions when we dump the pagetable to help with debugging.

Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
arch/arm/cpu/armv8/cache_v8.c

index f07204ed2fad1dc4f3ed1734dedea9dc1dacc9dc..91c55591a1d9090dc19ba49a819dddf614068df6 100644 (file)
@@ -534,7 +534,7 @@ static void __pagetable_walk(u64 addr, u64 tcr, int level, pte_walker_cb_t cb, v
                if (exit)
                        return;
 
-               if (pte_type(&pte) == PTE_TYPE_FAULT)
+               if (!pte)
                        continue;
 
                attrs = pte & ALL_ATTRS;
@@ -573,7 +573,7 @@ static void __pagetable_walk(u64 addr, u64 tcr, int level, pte_walker_cb_t cb, v
                        /* Go down a level */
                        __pagetable_walk(_addr, tcr, level + 1, cb, priv);
                        state[level] = WALKER_STATE_START;
-               } else if (pte_type(&pte) == PTE_TYPE_BLOCK || pte_type(&pte) == PTE_TYPE_PAGE) {
+               } else {
                        /* We foud a block or page, start walking */
                        entry_start = pte;
                        state[level] = WALKER_STATE_REGION;