mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master] ARM: cpu: start: fix ramoops and OP-TEE co-existence
Date: Thu, 17 Apr 2025 21:41:27 +0200	[thread overview]
Message-ID: <20250417194127.469297-1-a.fatoum@pengutronix.de> (raw)

arm_mem_ramoops is supposed to take the end of memory as argument to
drive the ramoops region's start offset from it.

Instead, arm_stack_top was passed, which is separated from end of memory
by the scratch area and the OP-TEE region if it exists.

The scratch area is just 32K, which tends to be  much smaller than the
ramoops region, so being 32K off didn't matter much. When we enable
OP-TEE though, the offset from the correct location is so big that it
can lead to probe errors:

  ERROR: ramoops: failed to request dump mem region (0x20000@0x4bdd0000): -12
  ERROR: ramoops 10000000.ramoops@10000000.of: probe failed: Out of memory

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/cpu/start.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index aa716a10c7b0..d6ab5a16b5bb 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -100,7 +100,7 @@ void *barebox_arm_boot_dtb(void)
 
 unsigned long arm_mem_ramoops_get(void)
 {
-	return arm_mem_ramoops(arm_stack_top);
+	return arm_mem_ramoops(arm_endmem);
 }
 EXPORT_SYMBOL_GPL(arm_mem_ramoops_get);
 
-- 
2.39.5




                 reply	other threads:[~2025-04-17 19:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250417194127.469297-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@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