Skip to contentSkip to conversation

configs: am43xx: Migrate to CONFIG_SYS_MEM_TOP_HIDE from CFG_PRAM

PATCH In review Beleswar Padhi 2 participants 3 messages Dec 9, 2025 – Dec 10, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: am43xx: Migrate to CONFIG_SYS_MEM_TOP_HIDE from CFG_PRAM

The TI AM43xx HS boards have been using CFG_PRAM to hide the top 64MB firewalled DRAM memory from U-Boot. However, CFG_PRAM only prevents U-Boot from relocating into that memory, but it is still open for access for any other usage.

Therefore, migrate into using CONFIG_SYS_MEM_TOP_HIDE which reduces the ram size itself ensuring that memory is not visible to U-Boot at all (either for reloc, or general usage).

---
Note: Build tested only.
Cc: Judith Mendez <[email protected]>

 configs/am43xx_hs_evm_defconfig      | 1 +
 configs/am43xx_hs_evm_qspi_defconfig | 1 +
 include/configs/am43xx_evm.h         | 5 -----
 3 files changed, 2 insertions(+), 5 deletions(-)
configs/am43xx_hs_evm_defconfig +1 -0
index c95fc0886bf..8bb13848a6a 100644
@@ -15,6 +15,7 @@ CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL_TEXT_BASE=0x403018e0
 CONFIG_SPL=y
+CONFIG_SYS_MEM_TOP_HIDE=0x4000000
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
configs/am43xx_hs_evm_qspi_defconfig +1 -0
index cc444ac2817..9b4bc178ed0 100644
@@ -14,6 +14,7 @@ CONFIG_TI_SECURE_EMIF_REGION_START=0xbdb00000
 CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x02000000
 CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000
 CONFIG_ENV_OFFSET_REDUND=0x120000
+CONFIG_SYS_MEM_TOP_HIDE=0x4000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_QSPI_BOOT=y
 CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
include/configs/am43xx_evm.h +0 -5
index 036995cbb48..99d3ecb3fff 100644
@@ -148,9 +148,4 @@
 #define NANDBOOT
 #endif /* CONFIG_MTD_RAW_NAND */
 
-#if defined(CONFIG_TI_SECURE_DEVICE)
-/* Avoid relocating onto firewalled area at end of DRAM */
-#define CFG_PRAM (64 * 1024)
-#endif /* CONFIG_TI_SECURE_DEVICE */
-
 #endif	/* __CONFIG_AM43XX_EVM_H */
Signature · 1 line
2.34.1
#1 lore raw
Quoted 10 lines · Beleswar Padhi

The TI AM43xx HS boards have been using CFG_PRAM to hide the top 64MB firewalled DRAM memory from U-Boot. However, CFG_PRAM only prevents U-Boot from relocating into that memory, but it is still open for access for any other usage.

Therefore, migrate into using CONFIG_SYS_MEM_TOP_HIDE which reduces the ram size itself ensuring that memory is not visible to U-Boot at all (either for reloc, or general usage).

So, since it sounds like we're failing to boot now and this fixes, it, it's fine for the release. But what's using the memory under CFG_PRAM, if we aren't relocating ourselves? I want to better understand the failure case here, thanks!

Signature · 1 line
Tom
#2 lore raw
In reply to Beleswar Padhi
Quoted 10 lines · Beleswar Padhi

The TI AM43xx HS boards have been using CFG_PRAM to hide the top 64MB firewalled DRAM memory from U-Boot. However, CFG_PRAM only prevents U-Boot from relocating into that memory, but it is still open for access for any other usage.

Therefore, migrate into using CONFIG_SYS_MEM_TOP_HIDE which reduces the ram size itself ensuring that memory is not visible to U-Boot at all (either for reloc, or general usage).

[...]

Applied to u-boot/master, thanks!

[1/1] configs: am43xx: Migrate to CONFIG_SYS_MEM_TOP_HIDE from CFG_PRAM

      commit: da54deb1ac8ee65475c7dca556df751b7e31806e
Signature · 1 line
Tom