Skip to contentSkip to conversation

xilinx: zynqmp: increase CONFIG_SYS_SPL_MALLOC_SIZE to 16MB

PATCH Applied Ricardo Salveti 2 participants 2 messages Jul 6, 2021 – Jul 7, 2021 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xilinx: zynqmp: increase CONFIG_SYS_SPL_MALLOC_SIZE to 16MB

commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images")' changed the way buffer allocation worked for SPL to a more flexible method.

For xilinx zynqmp the 1MB buffer is not necessarily enough when dealing with complex fit images (e.g. containing FPGA/TF-A/OP-TEE/U-Boot proper), which can easily reach up to 10MB, so increase the default CONFIG_SYS_SPL_MALLOC_SIZE size to 16MB to cover more advanced scenarios.

---
 include/configs/xilinx_zynqmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/xilinx_zynqmp.h +1 -1
index cadaf1a9631..bfe8a204279 100644
@@ -261,7 +261,7 @@
 #endif
 
 #define CONFIG_SYS_SPL_MALLOC_START	0x20000000
-#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x1000000
 
 #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE
 # error "Disable CONFIG_SPL_SYS_MALLOC_SIMPLE. Full malloc needs to be used"
Signature · 1 line
2.32.0
Applied
#1 lore raw
Quoted 21 lines · Ricardo Salveti

commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images")' changed the way buffer allocation worked for SPL to a more flexible method.

For xilinx zynqmp the 1MB buffer is not necessarily enough when dealing with complex fit images (e.g. containing FPGA/TF-A/OP-TEE/U-Boot proper), which can easily reach up to 10MB, so increase the default CONFIG_SYS_SPL_MALLOC_SIZE size to 16MB to cover more advanced scenarios.

---
 include/configs/xilinx_zynqmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/xilinx_zynqmp.h +0 -0
index cadaf1a9631..bfe8a204279 100644

include/configs/xilinx_zynqmp.h line 267

Quoted 8 lines
include/configs/xilinx_zynqmp.h +1 -1
@@ -261,7 +261,7 @@
 #endif
 
 #define CONFIG_SYS_SPL_MALLOC_START	0x20000000
-#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x1000000
 
 #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE
 # error "Disable CONFIG_SPL_SYS_MALLOC_SIMPLE. Full malloc needs to be used"

Applied.
M