mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] arch: arm: imx: esdctl: limit ram to 1GB on imx93 in case OPTEE is enabled
@ 2025-04-30 21:27 Michael Grzeschik
  2025-04-30 22:16 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2025-04-30 21:27 UTC (permalink / raw)
  To: barebox

In MX93 the ELE (Edge Lock Enclave) is limited to communicate with
messages addressed under 1.5GB. The ELE can not reach the memory between
(0xE0000000-0xFFFFFFFF).

So we limit the usable memory in case OPTEE is used.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 arch/arm/mach-imx/esdctl.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
index 701ca0ac1f3..79f697d6288 100644
--- a/arch/arm/mach-imx/esdctl.c
+++ b/arch/arm/mach-imx/esdctl.c
@@ -589,6 +589,15 @@ resource_size_t imx9_ddrc_sdram_size(void)
 		mem += memory_sdram_size(cols, rows, banks, width);
 	}
 
+	/* In MX93 the ELE is limited to comunicate with messages
+	 * under 1.5GB address space. This limits the overal memory
+	 * to be 1GB in case OPTEE is used.
+	 */
+	if (IS_ENABLED(CONFIG_PBL_OPTEE)) {
+		if (mem > 0x40000000)
+			mem = 0x40000000;
+	}
+
 	return mem;
 }
 

---
base-commit: 873b572763d38ab4100d218d0a3614f79b596077
change-id: 20250430-imx9optee-31d2dfc926bf

Best regards,
-- 
Michael Grzeschik <m.grzeschik@pengutronix.de>




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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-30 21:27 [PATCH] arch: arm: imx: esdctl: limit ram to 1GB on imx93 in case OPTEE is enabled Michael Grzeschik
2025-04-30 22:16 ` Ahmad Fatoum

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