[U-Boot] SUNXI: A64: Increase SPL size

Jagan Teki jagannadh.teki at gmail.com
Wed Nov 8 19:59:21 UTC 2017


Hi,

I'm trying to increase SPL size to 64K(with SRAM A2), so-that SPL can
able to fit new features like falcon. I knew the limit about 32K but
page[1] stating that we can use approximately 192 KiB of contiguous
SRAM.

eGON.BT0 has limit of reading 32KB, Can't we use > 32KB SPL here?
because I've tried with 64K SPL size with existing SPL code and was
able to boot, but with increasing SPL by enabling falcon seems like
BROM unable read eGON.BT0 which eventually booting failed. Any inputs?

diff:
----
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 0bd8370..b43c1ff 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -139,7 +139,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
 config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
        hex "Address on the MMC to load U-Boot from"
        depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
-       default 0x50 if ARCH_SUNXI
+       default 0x90 if ARCH_SUNXI
        default 0x75 if ARCH_DAVINCI
        default 0x8a if ARCH_MX6
        default 0x100 if ARCH_ROCKCHIP || ARCH_UNIPHIER
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index bc74dba..805489c 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -99,7 +99,7 @@
  * the 1 actually activates the mapping of the first 32 KiB to 0x00000000.
  */
 #define CONFIG_SYS_INIT_RAM_ADDR       0x10000
-#define CONFIG_SYS_INIT_RAM_SIZE       0x08000 /* FIXME: 40 KiB ? */
+#define CONFIG_SYS_INIT_RAM_SIZE       0x10000 /* FIXME: 40 KiB ? */
 #else
 #define CONFIG_SYS_INIT_RAM_ADDR       0x0
 #define CONFIG_SYS_INIT_RAM_SIZE       0x8000  /* 32 KiB */
@@ -191,7 +191,7 @@

 #ifdef CONFIG_SUNXI_HIGH_SRAM
 #define CONFIG_SPL_TEXT_BASE           0x10060         /* sram start+header */
-#define CONFIG_SPL_MAX_SIZE            0x7fa0          /* 32 KiB */
+#define CONFIG_SPL_MAX_SIZE            0xffa0          /* 192 KiB */
 #ifdef CONFIG_ARM64
 /* end of SRAM A2 for now, as SRAM A1 is pretty tight for an ARM64 build */
 #define LOW_LEVEL_SRAM_STACK           0x00054000
@@ -206,7 +206,7 @@

 #define CONFIG_SPL_STACK               LOW_LEVEL_SRAM_STACK

-#define CONFIG_SPL_PAD_TO              32768           /* decimal for 'dd' */
+#define CONFIG_SPL_PAD_TO              65536           /* decimal for 'dd' */
diff --git a/tools/mksunxiboot.c b/tools/mksunxiboot.c
index db0f10e..31df7e2 100644
--- a/tools/mksunxiboot.c
+++ b/tools/mksunxiboot.c
@@ -48,7 +48,7 @@ int gen_check_sum(struct boot_file_head *head_p)
 #define ALIGN(x, a) __ALIGN_MASK((x), (typeof(x))(a)-1)
 #define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))

-#define SUNXI_SRAM_SIZE 0x8000 /* SoC with smaller size are limited before */
+#define SUNXI_SRAM_SIZE 0x10000        /* SoC with smaller size are
limited before */
 #define SRAM_LOAD_MAX_SIZE (SUNXI_SRAM_SIZE - sizeof(struct boot_file_head))

[1] http://linux-sunxi.org/BROM

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.


More information about the U-Boot mailing list