From: Patrice Chotard <patrice.chotard@foss.st.com>
Date: Wed, 18 Dec 2024 07:58:33 +0000 (+0100)
Subject: Kconfig: Set STACK_SIZE to 16KB for STM32 MCUs
X-Git-Tag: v2025.01-rc5-pxa1908~42^2~10
X-Git-Url: http://git.dujemihanovic.xyz/img/static//%22brlog.php?a=commitdiff_plain;h=d4ce588515c182648f05f7f020df5842aa0754d9;p=u-boot.git

Kconfig: Set STACK_SIZE to 16KB for STM32 MCUs

Since commit 6534d26ee9a5 ("lmb: do away with arch_lmb_reserve()"),
STM32F746-disco hangs when loading device tree just before starting
kernel:

Retrieving file: /stm32f746-disco.dtb
Kernel image @ 0xc0008000 [ 0x000000 - 0x19ae00 ]
Flattened Device Tree blob at c0408000
   Booting using the fdt blob at 0xc0408000
Working FDT set to c0408000
   Loading Device Tree to c05f8000, end c05ff71c ...

Adjust STACK_SIZE to 16KB for STM32 MCUs (F4/F7 and H7) boards
to fix kernel boot process as some of these boards embeds a limited
amount of memory.

Fixes: 6534d26ee9a5 ("lmb: do away with arch_lmb_reserve()")

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

diff --git a/Kconfig b/Kconfig
index 1f5b0f1972..c087a420a2 100644
--- a/Kconfig
+++ b/Kconfig
@@ -578,6 +578,7 @@ config STACK_SIZE
 	hex "Define max stack size that can be used by U-Boot"
 	default 0x4000000 if ARCH_VERSAL_NET || ARCH_VERSAL || ARCH_ZYNQMP
 	default 0x200000 if MICROBLAZE
+	default 0x4000 if ARCH_STM32
 	default 0x1000000
 	help
 	  Define Max stack size that can be used by U-Boot. This value is used