[U-Boot] [PATCH 4/4] sunxi: Use more realistic size limit for FEL SPL

Siarhei Siamashka siarhei.siamashka at gmail.com
Fri Jan 30 12:58:49 CET 2015


The older 16 KiB limit was overly optimistic. The FEL SPL binary
is loaded at the address 0x2000 (which is also the entry point),
and the stack pointer is set by the FEL BROM code to 0x5E00 on
Allwinner A20 right at the start. This gives us around 15872
bytes for everything (code, data and stack). Considering that
the stack usage is somewhere between 1 KiB and 1.5 KiB (mostly
because of printf buffers), setting 14 KiB as the FEL SPL size
limit is reasonable.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka at gmail.com>
---
 include/configs/sunxi-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index c644ad4..85965f4 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -155,7 +155,7 @@
 
 #define CONFIG_SPL_START_S_PATH "arch/arm/cpu/armv7/sunxi"
 #define CONFIG_SPL_TEXT_BASE		0x2000
-#define CONFIG_SPL_MAX_SIZE		0x4000		/* 16 KiB */
+#define CONFIG_SPL_MAX_SIZE		0x3800		/* 14 KiB */
 
 #else /* CONFIG_SPL */
 
-- 
2.0.5



More information about the U-Boot mailing list