mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 3/3] ARM: rockchip: atf: pass correct memsize to mmu_early_enable()
Date: Wed, 13 May 2026 15:55:52 +0200	[thread overview]
Message-ID: <20260513-rockchip-fixes-v1-3-a4055849a014@pengutronix.de> (raw)
In-Reply-To: <20260513-rockchip-fixes-v1-0-a4055849a014@pengutronix.de>

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




  parent reply	other threads:[~2026-05-13 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 13:55 [PATCH 0/3] ARM: Rockchip: regression fixes Sascha Hauer
2026-05-13 13:55 ` [PATCH 1/3] ARM: rockchip: atf: only set OP-TEE address when starting it Sascha Hauer
2026-05-13 13:55 ` [PATCH 2/3] ARM: rockchip: dmc: substract ROCKCHIP_DRAM_TFA_CARVE_OUT from memory regions Sascha Hauer
2026-05-13 13:55 ` Sascha Hauer [this message]
2026-05-15  9:28 ` [PATCH 0/3] ARM: Rockchip: regression fixes Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260513-rockchip-fixes-v1-3-a4055849a014@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox