[PATCH master] ARM: mmu32: mark whole early pagetable region as reserved

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Aug 31 02:09:43 PDT 2023


The TTB area allocated for early MMU is now 64K instead of 16K, yet only
the old 16K were requested to ensure e.g. memtest doesn't touch them.

Fix this by requesting the full region.

Fixes: 407ff71a3b5d ("ARM: mmu: alloc 64k for early page tables")
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 arch/arm/cpu/mmu_32.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/mmu_32.c b/arch/arm/cpu/mmu_32.c
index ebe92969997e..3ed76e30840a 100644
--- a/arch/arm/cpu/mmu_32.c
+++ b/arch/arm/cpu/mmu_32.c
@@ -561,7 +561,8 @@ void __mmu_init(bool mmu_on)
 	struct memory_bank *bank;
 	uint32_t *ttb = get_ttb();
 
-	if (!request_sdram_region("ttb", (unsigned long)ttb, SZ_16K))
+	if (!request_sdram_region("ttb", (unsigned long)ttb,
+				  ARM_EARLY_PAGETABLE_SIZE))
 		/*
 		 * This can mean that:
 		 * - the early MMU code has put the ttb into a place
-- 
2.39.2




More information about the barebox mailing list