LMB reserves CONFIG_STACK_SIZE below the relocated stack pointer. The
default 16MB is a quarter of the 64MB of DRAM on this board and leaves
only about 1.4MB free above ramdisk_addr_r.

Use 1MB, as the other small memory RISC-V boards do (sipeed_maix_bitm,
sipeed_maix_smode). This is well above the 128KiB required by the UEFI
specification, and leaves about 16MB for an initrd.

Reviewed-by: Yao Zi <[email protected]>
Signed-off-by: Hiago De Franco <[email protected]>
---
 configs/milkv_duo_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/milkv_duo_defconfig b/configs/milkv_duo_defconfig
index 8c6778442e6..c6c0dbb4be6 100644
--- a/configs/milkv_duo_defconfig
+++ b/configs/milkv_duo_defconfig
@@ -10,6 +10,7 @@ CONFIG_IDENT_STRING="milkv_duo"
 CONFIG_TARGET_MILKV_DUO=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
+CONFIG_STACK_SIZE=0x100000
 CONFIG_FIT=y
 CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_SYS_CBSIZE=512

-- 
2.53.0

Reply via email to