[U-Boot] [PATCH] ARM: tegra: define CONFIG_SYS_BOOTMAPSZ

Stephen Warren swarren at wwwdotorg.org
Thu Sep 20 21:29:03 CEST 2012


From: Stephen Warren <swarren at nvidia.com>

This define indicates the size of the memory region where it is safe
to place data passed to the Linux kernel (ATAGs, DTB, initrd). The
value needs to be:

a) Less than or equal to RAM size.
b) Small enough that the area is not within the kernel's highmem region,
   since the kernel cannot access ATAGs/DTB/initrd from highmem.
c) Large enough to hold the kernel+DTB+initrd.

256M seems large enough for (c) in most circumstances, and small enough
to satisfy (a) and (b) across any possible Tegra board. Note that the
user can override this value via environment variable "bootm_mapsize"
if needed.

The advantage of defining BOOTMAPSZ is that we no longer need to define
variable fdt_high in the default environment. Previously, we defined
this to prevent the DTB from being relocated to the very end of RAM,
which on most Tegra systems is within highmem, and hence which would
cause boot failures. A user can still define this variable themselves
if they want the FDT to be either left in-place wherever loaded, or
copied to some other specific location. Similarly, there should no
longer be a strict requirement for the user to define initrd_high if
using an initrd.

Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
 include/configs/tegra-common-post.h |    1 -
 include/configs/tegra20-common.h    |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index dda46c6..1e7aea9 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -143,7 +143,6 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	TEGRA_DEVICE_SETTINGS \
 	"fdt_load=0x01000000\0" \
-	"fdt_high=01100000\0" \
 	BOOTCMDS_COMMON
 
 /* overrides for SPL build here */
diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h
index 1492f2a..4c03922 100644
--- a/include/configs/tegra20-common.h
+++ b/include/configs/tegra20-common.h
@@ -177,6 +177,8 @@
 #define CONFIG_SYS_TEXT_BASE	0x0010c000
 #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1
 
+#define CONFIG_SYS_BOOTMAPSZ	(256 << 20) /* 256M */
+
 #define CONFIG_SYS_INIT_RAM_ADDR	CONFIG_STACKBASE
 #define CONFIG_SYS_INIT_RAM_SIZE	CONFIG_SYS_MALLOC_LEN
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + \
-- 
1.7.0.4



More information about the U-Boot mailing list