[PATCH master] ARM: cpu: start: fix ramoops and OP-TEE co-existence

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Apr 17 12:41:27 PDT 2025


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 at 0x4bdd0000): -12
  ERROR: ramoops 10000000.ramoops at 10000000.of: probe failed: Out of memory

Signed-off-by: Ahmad Fatoum <a.fatoum at 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




More information about the barebox mailing list