[Concept,01/21] configs: raise SPL_SYS_MALLOC_SIZE to 8 MiB on RISC-V

Message ID 20251214175449.3799539-2-sjg@u-boot.org
State New
Headers
Series test: Add support for passing arguments to C unit tests |

Commit Message

Simon Glass Dec. 14, 2025, 5:54 p.m. UTC
  From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

On several RISC-V boards we have seen that 1 MiB is a insufficient value
for CONFIG_SPL_SYS_MALLOC_SIZE.

For instance qemu-riscv32_spl_defconfig fails booting because u-boot.itb
exceeds 1 MiB.

8 MiB is a reasonable value that allows adding FPGA blobs or splash images
to main U-boot.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
(cherry picked from commit 8b410cab51266a0f6ee9c20e7f2bac9cfec079e8)
Dropped modifications to all files except common/spl/Kconfig:
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 common/spl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index da0a358b2a3..c40dc5a1fe9 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -481,6 +481,7 @@  config SPL_CUSTOM_SYS_MALLOC_ADDR
 config SPL_SYS_MALLOC_SIZE
 	hex "Size of the SPL malloc pool"
 	depends on SPL_SYS_MALLOC
+	default 0x800000 if RISCV
 	default 0x100000
 
 config SPL_READ_ONLY