[PATCH 3/3] ARM: rockchip: atf: pass correct memsize to mmu_early_enable()

Sascha Hauer s.hauer at pengutronix.de
Wed May 13 06:55:52 PDT 2026


Second argument of mmu_early_enable() is the usable memory size. Pass
memsize[0] there which contains the memory size as the name suggests.
Without this the TTB ends up outside the DRAM.

Fixes: f2ae1a4a85 ("ARM: rockchip: atf: enable MMU in PBL")
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-rockchip/atf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-rockchip/atf.c b/arch/arm/mach-rockchip/atf.c
index 62ed73a920..3e2e18ac29 100644
--- a/arch/arm/mach-rockchip/atf.c
+++ b/arch/arm/mach-rockchip/atf.c
@@ -172,7 +172,7 @@ static void rockchip_atf_load_bl31(void *fdt)
 {
 	unsigned long bl31_ep;
 
-	mmu_early_enable(membase[0], membase[0] + memsize[0]);
+	mmu_early_enable(membase[0], memsize[0]);
 
 	bl31_ep = load_elf64_image_phdr(&bl31);
 

-- 
2.47.3




More information about the barebox mailing list