diff mbox

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

Message ID 1422619129-23352-5-git-send-email-siarhei.siamashka@gmail.com
State Superseded
Delegated to: Hans de Goede
Headers show

Commit Message

Siarhei Siamashka Jan. 30, 2015, 11:58 a.m. UTC
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@gmail.com>
---
 include/configs/sunxi-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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 */