[U-Boot] [PATCH 7/6] sunxi: Reserve ATF memory space on A64

Alexander Graf agraf at suse.de
Wed Mar 30 17:53:56 CEST 2016


On the A64 we usually boot with ATF running in EL3. ATF as it is available
today resides in the first 16MB of RAM. So we should make sure we reserve
that space in our memory maps.

Signed-off-by: Alexander Graf <agraf at suse.de>
---
 board/sunxi/board.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 74510c5..331cb0a 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -136,6 +136,15 @@ int dram_init(void)
 	return 0;
 }
 
+#ifdef CONFIG_MACH_SUN50I
+void dram_init_banksize(void)
+{
+	/* We need to reserve the first 16MB of RAM for ATF */
+	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE + (16 * 1024 * 1024);
+	gd->bd->bi_dram[0].size = get_effective_memsize() - (16 * 1024 * 1024);
+}
+#endif
+
 #if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
 static void nand_pinmux_setup(void)
 {
-- 
1.8.5.6



More information about the U-Boot mailing list