mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] ARM: cpu: start: fix ramoops and OP-TEE co-existence
@ 2025-04-17 19:41 Ahmad Fatoum
  2025-04-22  8:16 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-04-17 19:41 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] ARM: cpu: start: fix ramoops and OP-TEE co-existence
  2025-04-17 19:41 [PATCH master] ARM: cpu: start: fix ramoops and OP-TEE co-existence Ahmad Fatoum
@ 2025-04-22  8:16 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-04-22  8:16 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Thu, 17 Apr 2025 21:41:27 +0200, Ahmad Fatoum wrote:
> 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:
> 
> [...]

Applied, thanks!

[1/1] ARM: cpu: start: fix ramoops and OP-TEE co-existence
      https://git.pengutronix.de/cgit/barebox/commit/?id=9658c3cb8ac5 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-22  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-17 19:41 [PATCH master] ARM: cpu: start: fix ramoops and OP-TEE co-existence Ahmad Fatoum
2025-04-22  8:16 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox