Skip to contentSkip to conversation

configs: Increase malloc size after relocation

PATCH Superseded Neha Malcom Francis 2 participants 3 messages Jan 11, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: Increase malloc size after relocation

Current default size of 0x100000 is not capable of getting the FIT buffer during boot when transitioning to using binman generated boot images for certain K3 devices, so increase it to 0x400000. Since A72 SPL is coming after relocation to DDR this should not be an issue for any K3 device, so make it default for all.

---
 common/spl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
common/spl/Kconfig +1 -0
index a25d8fd2e0..d8c78ddb76 100644
@@ -385,6 +385,7 @@ config SPL_STACK_R_ADDR
 config SPL_STACK_R_MALLOC_SIMPLE_LEN
 	depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
 	hex "Size of malloc_simple heap after switching to DRAM SPL stack"
+	default 0x400000 if ARCH_K3
 	default 0x100000
 	help
 	  Specify the amount of the stack to use as memory pool for
Signature · 1 line
2.34.1
#1 lore raw
Quoted 16 lines · Neha Malcom Francis

Current default size of 0x100000 is not capable of getting the FIT buffer during boot when transitioning to using binman generated boot images for certain K3 devices, so increase it to 0x400000. Since A72 SPL is coming after relocation to DDR this should not be an issue for any K3 device, so make it default for all.

---
 common/spl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
common/spl/Kconfig +0 -0
index a25d8fd2e0..d8c78ddb76 100644

common/spl/Kconfig config SPL_STACK_R_ADDR · line 388

Quoted 4 lines
common/spl/Kconfig +1 -0
@@ -385,6 +385,7 @@ config SPL_STACK_R_ADDR
 config SPL_STACK_R_MALLOC_SIMPLE_LEN
 	depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
 	hex "Size of malloc_simple heap after switching to DRAM SPL stack"
+	default 0x400000 if ARCH_K3

Wont this take affect for both R5 SPL and A72 SPL as ARCH_K3 = y in both cases?

Quoted 3 lines
common/spl/Kconfig +0 -0
 	default 0x100000
 	help
 	  Specify the amount of the stack to use as memory pool for
Signature · 2 lines
Regards
Vignesh
#2 lore raw

Hi Vignesh,

Quoted 14 lines · Vignesh Raghavendra
Quoted 11 lines · Neha Malcom Francis

Current default size of 0x100000 is not capable of getting the FIT buffer during boot when transitioning to using binman generated boot images for certain K3 devices, so increase it to 0x400000. Since A72 SPL is coming after relocation to DDR this should not be an issue for any K3 device, so make it default for all.

---
  common/spl/Kconfig | 1 +
  1 file changed, 1 insertion(+)
Quoted 12 lines

common/spl/Kconfig config SPL_STACK_R_ADDR · line 388

Quoted 9 lines
common/spl/Kconfig +1 -0
index a25d8fd2e0..d8c78ddb76 100644
@@ -385,6 +385,7 @@ config SPL_STACK_R_ADDR
  config SPL_STACK_R_MALLOC_SIMPLE_LEN
  	depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
  	hex "Size of malloc_simple heap after switching to DRAM SPL stack"
+	default 0x400000 if ARCH_K3

Wont this take affect for both R5 SPL and A72 SPL as ARCH_K3 = y in both cases?

J721E and J7200 did not have SPL_SYS_MALLOC_SIMPLE set in R5 and that misled me into believing it was the same for other K3 devices as well, which it is not. You're right, it will take effect for A72 SPL, I will change it to only if it is both ARCH_K3 and ARM64

Quoted 5 lines
Quoted 4 lines
common/spl/Kconfig +0 -0
  	default 0x100000
  	help
  	  Specify the amount of the stack to use as memory pool for
Signature · 2 lines
Thanking You
Neha Malcom Francis