Skip to contentSkip to conversation

malloc size cleanup for K3 devices

PATCH In review Udit Kumar 2 participants 6 messages Jun 14, 2025 – Jun 26, 2025

lore
Share & tools
lore

Udit Kumar

author
#0 lore raw

cover malloc size cleanup for K3 devices

Many boards based upon K3 ARCH overrides default malloc size to 32MB, as part of cleanup, add default size of 32MB for K3 ARCH.

Udit Kumar (2):
Kconfig: Add default malloc size of K3 ARCH
configs: j7*/*am62*: Remove malloc size overwrite at config level.

 Kconfig                                    | 2 +-
 configs/am62x_a53_usbdfu.config            | 1 -
 configs/am64x_evm_a53_defconfig            | 1 -
 configs/am64x_evm_r5_defconfig             | 1 -
 configs/am65x_evm_a53_defconfig            | 1 -
 configs/am65x_evm_r5_defconfig             | 1 -
 configs/am65x_evm_r5_usbdfu_defconfig      | 1 -
 configs/am65x_evm_r5_usbmsc_defconfig      | 1 -
 configs/j7200_evm_a72_defconfig            | 1 -
 configs/j7200_evm_r5_defconfig             | 1 -
 configs/j721e_beagleboneai64_a72_defconfig | 1 -
 configs/j721e_beagleboneai64_r5_defconfig  | 1 -
 configs/j721e_evm_a72_defconfig            | 1 -
 configs/j721e_evm_r5_defconfig             | 1 -
 configs/j721s2_evm_a72_defconfig           | 1 -
 configs/j721s2_evm_r5_defconfig            | 1 -
 configs/j784s4_evm_a72_defconfig           | 1 -
 configs/j784s4_evm_r5_defconfig            | 1 -
 configs/phycore_am62ax_a53_defconfig       | 1 -
 configs/phycore_am62x_a53_defconfig        | 1 -
 configs/phycore_am64x_a53_defconfig        | 1 -
 configs/phycore_am64x_r5_defconfig         | 1 -
 configs/verdin-am62_a53_defconfig          | 1 -
 23 files changed, 1 insertion(+), 23 deletions(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/2 Kconfig: Add default malloc size of K3 ARCH

Many boards of K3 overwrites default malloc size, instead of doing at almost each board level,
Add default size at Kconfig.

---
 Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Kconfig +1 -1
index 51358633762..05b7f410fa5 100644
@@ -309,7 +309,7 @@ config SYS_MALLOC_F_LEN
 config SYS_MALLOC_LEN
 	hex "Define memory for Dynamic allocation"
 	default 0x4000000 if SANDBOX
-	default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON
+	default 0x2000000 if ARCH_ROCKCHIP || ARCH_OMAP2PLUS || ARCH_MESON || ARCH_K3
 	default 0x200000 if ARCH_BMIPS || X86
 	default 0x4020000 if SUNXI_MINIMUM_DRAM_MB >= 256
 	default 0x220000 if SUNXI_MINIMUM_DRAM_MB >= 64
Signature · 1 line
2.34.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] Kconfig: Add default malloc size of K3 ARCH

Quoted 5 lines · Udit Kumar

Many boards of K3 overwrites default malloc size, instead of doing at almost each board level,
Add default size at Kconfig.

Signature · 1 line
Tom
author
#3 lore raw

PATCH 2/2 configs: j7*/*am62*: Remove malloc size overwrite at config level.

In reply to Udit Kumar

Use default value of malloc size coming from Kconfig, instead of board specific override.

---
 configs/am62x_a53_usbdfu.config            | 1 -
 configs/am64x_evm_a53_defconfig            | 1 -
 configs/am64x_evm_r5_defconfig             | 1 -
 configs/am65x_evm_a53_defconfig            | 1 -
 configs/am65x_evm_r5_defconfig             | 1 -
 configs/am65x_evm_r5_usbdfu_defconfig      | 1 -
 configs/am65x_evm_r5_usbmsc_defconfig      | 1 -
 configs/j7200_evm_a72_defconfig            | 1 -
 configs/j7200_evm_r5_defconfig             | 1 -
 configs/j721e_beagleboneai64_a72_defconfig | 1 -
 configs/j721e_beagleboneai64_r5_defconfig  | 1 -
 configs/j721e_evm_a72_defconfig            | 1 -
 configs/j721e_evm_r5_defconfig             | 1 -
 configs/j721s2_evm_a72_defconfig           | 1 -
 configs/j721s2_evm_r5_defconfig            | 1 -
 configs/j784s4_evm_a72_defconfig           | 1 -
 configs/j784s4_evm_r5_defconfig            | 1 -
 configs/phycore_am62ax_a53_defconfig       | 1 -
 configs/phycore_am62x_a53_defconfig        | 1 -
 configs/phycore_am64x_a53_defconfig        | 1 -
 configs/phycore_am64x_r5_defconfig         | 1 -
 configs/verdin-am62_a53_defconfig          | 1 -
 22 files changed, 22 deletions(-)
configs/am62x_a53_usbdfu.config +0 -1
index 16cd4c89f41..373b1d0ed64 100644
@@ -1,4 +1,3 @@
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_RAM_SUPPORT=y
 CONFIG_SPL_RAM_DEVICE=y
configs/am64x_evm_a53_defconfig +0 -1
index 8f7d098f770..318a2270da2 100644
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_GPIO=y
configs/am64x_evm_r5_defconfig +0 -1
index b222bcd6e43..3f7012c99ce 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x80000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/am65x_evm_a53_defconfig +0 -1
index a41f67a43fe..2cc7ae1cbc1 100644
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/am65x_evm_r5_defconfig +0 -1
index 386749ebabd..7849c89500a 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x55000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/am65x_evm_r5_usbdfu_defconfig +0 -1
index b0d333d95c2..3ac494f0126 100644
@@ -2,7 +2,6 @@
 
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x57000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/am65x_evm_r5_usbmsc_defconfig +0 -1
index 90a857b8b95..7bd65bfef0c 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x55000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/j7200_evm_a72_defconfig +0 -1
index a446074ad5d..ca444cfa349 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_GPIO=y
configs/j7200_evm_r5_defconfig +0 -1
index 0ae07ddf7c8..b9ffa1fc989 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x70000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/j721e_beagleboneai64_a72_defconfig +0 -1
index e3cd59343f0..fbe6a839fb5 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/j721e_beagleboneai64_r5_defconfig +0 -1
index 086ad99ff6d..7d5c71e5650 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x70000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/j721e_evm_a72_defconfig +0 -1
index 99461cf6007..16c3c3243b2 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/j721e_evm_r5_defconfig +0 -1
index c8324d4c068..fce4d32a48c 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x70000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/j721s2_evm_a72_defconfig +0 -1
index 084deea28d0..8249a50d46f 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_GPIO=y
configs/j721s2_evm_r5_defconfig +0 -1
index 6ea1d712be1..71fa0d57bc2 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x10000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/j784s4_evm_a72_defconfig +0 -1
index 56af0230860..ba164697802 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_SPL_GPIO=y
configs/j784s4_evm_r5_defconfig +0 -1
index 4f5a0c943d8..4c4fd787714 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x10000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/phycore_am62ax_a53_defconfig +0 -1
index c74909dabdf..06a9c5a3152 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/phycore_am62x_a53_defconfig +0 -1
index 487eafb0e17..18bd2c703ac 100644
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARM_SMCCC=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/phycore_am64x_a53_defconfig +0 -1
index 2032a34030f..a317ab29c34 100644
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/phycore_am64x_r5_defconfig +0 -1
index 2552479713f..fe21b412f67 100644
@@ -1,6 +1,5 @@
 CONFIG_ARM=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x80000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/verdin-am62_a53_defconfig +0 -1
index 4bdcb4b6c46..5b2c7f05605 100644
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_SKIP_LOWLEVEL_INIT=y
 CONFIG_ARCH_K3=y
-CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_SPL_GPIO=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
Signature · 1 line
2.34.1
#5 lore raw
In reply to Udit Kumar
Quoted 8 lines · Udit Kumar

Many boards based upon K3 ARCH overrides default malloc size to 32MB, as part of cleanup, add default size of 32MB for K3 ARCH.

Udit Kumar (2):
Kconfig: Add default malloc size of K3 ARCH
configs: j7*/*am62*: Remove malloc size overwrite at config level.

[...]

Applied to u-boot/next, thanks!

[1/2] Kconfig: Add default malloc size of K3 ARCH

      commit: e53d46393eacf6cef51f8bfe9ed730568b02583e
[2/2] configs: j7*/*am62*: Remove malloc size overwrite at config level.
      commit: 27c0b05855e0b19452fa0d57997ea5c48d2435b1
Signature · 1 line
Tom