Skip to contentSkip to conversation

board: ea: mx7ulp_com: allocate specific region of memory to OP-TEE

PATCH New Oleksandr Suvorov 2 participants 2 messages Aug 25, 2021 – Oct 21, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 board: ea: mx7ulp_com: allocate specific region of memory to OP-TEE

From: Ricardo Salveti <[email protected]>

On the iMX7ULP uCOM board, OP-TEE uses the memory region defined by the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE, so subtract CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size to avoid conflicts.

Note the OPTEE boot process itself subtracts the DRAM region it lives in from the memory map passed to Linux.

---

Changes in v2:
- add missed Signed-off-by
- add Reviewed-by

 board/ea/mx7ulp_com/mx7ulp_com.c | 4 ++++
 1 file changed, 4 insertions(+)
board/ea/mx7ulp_com/mx7ulp_com.c +4 -0
index 5b2d444366..7fce75ade9 100644
@@ -20,6 +20,10 @@ int dram_init(void)
 {
 	gd->ram_size = imx_ddr_size();
 
+#ifdef CONFIG_OPTEE_TZDRAM_SIZE
+	gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE;
+#endif
+
 	return 0;
 }
 
Signature · 1 line
2.31.1
#1 lore raw

PATCH v2 1/1 board: ea: mx7ulp_com: allocate specific region of memory to OP-TEE

Quoted 10 lines

From: Ricardo Salveti <[email protected]>
On the iMX7ULP uCOM board, OP-TEE uses the memory region defined by the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE, so subtract CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size to avoid conflicts.
Note the OPTEE boot process itself subtracts the DRAM region it lives in from the memory map passed to Linux.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================