summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorKamlesh Gurudasani <kamlesh@ti.com>2022-10-13 18:35:17 +0530
committerAnand Gadiyar <gadiyar@ti.com>2022-11-10 08:48:23 -0600
commit525f95f8e7f476e838136fbf0b32e496897906da (patch)
tree297a9d481fa446ca8d2953e598839a8d5bc3461e /configs
parent5ed51ed46ff1b2b8e36b41098532617c3581e189 (diff)
configs: am62x: Move stack and heap from OC SRAM to HSMRAM
OCSRAM is firewalled by ROM, so before TIFS opens up that firewall, we can't access it. Because of this, we were getting firewall exception in r5 core. Moving STACK/HEAP to HSM SRAM as it is not firewalled. Due to space constraint on HSMRAM, reduced malloc to 28672 bytes. Max actual usage noticed was 26340 bytes Max stack size 13568, SPL initial stack usage: 13424 bytes Enabled option to subtract size of HEAP, GD and stack section from SPL_SIZE_LIMIT. Updated SPL_SIZE_LIMIT will consist of text, heap, stack, gd. Text section is 193160 bytes, allocated max size is 196607. Removing CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY=y as it is increasing size of text section by 10k and we don't need it as of now. from am62x_evm_r5_usbdfu_defconfig, removed CONFIG_MMC_SDHCI_AM654=y as it wasn't fitting and adding 10k more. This breaks mmc boot using usbdfu_defconfig old map: HSM SRAM (256KB) PSRAM (64KB) 0x43c00000┌───────────────┐ ┌──────────────┐0x70000000 │ │ │ ▲ │ │ │ │ Stack │ │ │ SPL IMAGE │ │ │ │ MAX 204KB │ ├──────────────┤0x70006f1f │(excluding BSS)│ │Global Data │ │ │ ├──────────────┤0x70006fff │ │ │ Heap (36KB) │ 0x43c33000├───────────────┤ └──────────────┘0x7000ffff │ EMPTY (18KB) │ 0x43c37800├───────────────┤ │ │ │ BSS (20KB max)│ 0x43c3c800├───────────────┤ │ │ │ DM data(1.5KB)│ 0x43c3cd82├───────────────┤ │ │ │ EMPTY (9KB) │ 0x43c3f290├───────────────┤ │ ROM extended │ │ boot info │ │ (3.5KB) │ 0x43c3ffff└───────────────┘ New map: HSM SRAM (256KB) 0x43c00000┌───────────────┐ │ │ │ │ │ SPL IMAGE │ │ MAX 204KB │ │(excluding BSS)│ │ 196607 B max │ │ │ 0x43c32fff├───────────────┤ │STACK 13568Bmax│ ├───────────────┤ │GD (428B max) │ ├───────────────┤ │ │ │HEAP (28KB max)│ 0x43c3a7f0├───────────────┤ │ 16B empty │ 0x43c3a800├───────────────┤ │ DM data(2KB) )│ 0x43c3b000├───────────────┤ │ │ │ BSS (12KB) )│ 0x43c3e000├───────────────┤ │ EMPTY (4.5KB) │ │Reserve for ROM│ 0x43c3f1e0├───────────────┤ │ ROM extended │ │ boot info │ │ (3.5KB) │ 0x43c3ffff└───────────────┘ Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com> [gadiyar@ti.com: fixed table formatting in commit message] Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Diffstat (limited to 'configs')
-rw-r--r--configs/am62x_evm_r5_defconfig8
-rw-r--r--configs/am62x_evm_r5_ethboot_defconfig7
-rw-r--r--configs/am62x_evm_r5_usbdfu_defconfig9
3 files changed, 15 insertions, 9 deletions
diff --git a/configs/am62x_evm_r5_defconfig b/configs/am62x_evm_r5_defconfig
index b86bf86e09..18a619cdc1 100644
--- a/configs/am62x_evm_r5_defconfig
+++ b/configs/am62x_evm_r5_defconfig
@@ -4,7 +4,7 @@ CONFIG_TI_SECURE_DEVICE=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x9000
+CONFIG_SYS_MALLOC_F_LEN=0x7000
CONFIG_NR_DRAM_BANKS=2
CONFIG_SOC_K3_AM625=y
CONFIG_TARGET_AM625_R5_EVM=y
@@ -18,7 +18,10 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_SPL_SIZE_LIMIT=0x38000
+CONFIG_SPL_SIZE_LIMIT=0x3A7F0
+CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y
+CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD=y
+CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500
CONFIG_SPL_FS_FAT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
@@ -26,7 +29,6 @@ CONFIG_SPL_SPI_SUPPORT=y
CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-sk"
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000
-CONFIG_SPL_LOAD_FIT_APPLY_OVERLAY=y
CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y
diff --git a/configs/am62x_evm_r5_ethboot_defconfig b/configs/am62x_evm_r5_ethboot_defconfig
index d9f642cad3..8f31522e64 100644
--- a/configs/am62x_evm_r5_ethboot_defconfig
+++ b/configs/am62x_evm_r5_ethboot_defconfig
@@ -1,9 +1,10 @@
CONFIG_ARM=y
CONFIG_ARCH_K3=y
+CONFIG_TI_SECURE_DEVICE=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x9000
+CONFIG_SYS_MALLOC_F_LEN=0x7000
CONFIG_SOC_K3_AM625=y
CONFIG_TARGET_AM625_R5_EVM=y
CONFIG_ENV_SIZE=0x20000
@@ -14,8 +15,8 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_SPL_SIZE_LIMIT=0x40000
-CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x4000
+CONFIG_SPL_SIZE_LIMIT=0x3A7F0
+CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500
CONFIG_SPL_FS_FAT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-sk"
diff --git a/configs/am62x_evm_r5_usbdfu_defconfig b/configs/am62x_evm_r5_usbdfu_defconfig
index 6f89642036..6456593779 100644
--- a/configs/am62x_evm_r5_usbdfu_defconfig
+++ b/configs/am62x_evm_r5_usbdfu_defconfig
@@ -1,9 +1,10 @@
CONFIG_ARM=y
CONFIG_ARCH_K3=y
+CONFIG_TI_SECURE_DEVICE=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x9000
+CONFIG_SYS_MALLOC_F_LEN=0x7000
CONFIG_SOC_K3_AM625=y
CONFIG_TARGET_AM625_R5_EVM=y
CONFIG_ENV_SIZE=0x20000
@@ -16,7 +17,10 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_SPL_SIZE_LIMIT=0x38000
+CONFIG_SPL_SIZE_LIMIT=0x3A7F0
+CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y
+CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD=y
+CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500
CONFIG_SPL_FS_FAT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
@@ -88,7 +92,6 @@ CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ADMA=y
CONFIG_SPL_MMC_SDHCI_ADMA=y
-CONFIG_MMC_SDHCI_AM654=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y