ARM: tegra: use CONFIG_SYS_INIT_SP_BSS_OFFSET
authorStephen Warren <swarren@nvidia.com>
Wed, 20 Dec 2017 01:30:37 +0000 (18:30 -0700)
committerTom Warren <twarren@nvidia.com>
Fri, 12 Jan 2018 16:52:11 +0000 (09:52 -0700)
Enable CONFIG_SYS_INIT_SP_BSS_OFFSET for all 64-bit Tegra boards. Place
the stack/... 512KiB from the end of the U-Boot binary. This should be
plenty to accommodate the current DTBs (max 64 KiB), early malloc region
(6KiB), stack usage, and plenty of slack, while still not placing it too
far away from the U-Boot binary.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/mach-tegra/tegra186/Kconfig
arch/arm/mach-tegra/tegra210/Kconfig
include/configs/tegra-common.h
include/configs/tegra186-common.h
include/configs/tegra210-common.h

index b2e53b58caf86b1041880dfa76861e430d97aab6..479c0955eec6a873ba07ac11325785482c4f518f 100644 (file)
@@ -21,6 +21,9 @@ endchoice
 config SYS_SOC
        default "tegra186"
 
+config SYS_INIT_SP_BSS_OFFSET
+       default 524288
+
 source "board/nvidia/p2771-0000/Kconfig"
 
 endif
index 3637473051b8ed87a5c4b2b003204cb4a932b574..250738aed3122e05f04f93924c65781af1701cf9 100644 (file)
@@ -40,6 +40,9 @@ endchoice
 config SYS_SOC
        default "tegra210"
 
+config SYS_INIT_SP_BSS_OFFSET
+       default 524288
+
 source "board/nvidia/e2220-1170/Kconfig"
 source "board/nvidia/p2371-0000/Kconfig"
 source "board/nvidia/p2371-2180/Kconfig"
index 75e36c0b759dea2477540336202faf044be307d5..2d98a6fa64a795de079872e717af4f0e411487f4 100644 (file)
 
 #define CONFIG_SYS_BOOTMAPSZ   (256 << 20)     /* 256M */
 
+#ifndef CONFIG_ARM64
 #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 + \
                                                CONFIG_SYS_INIT_RAM_SIZE - \
                                                GENERATED_GBL_DATA_SIZE)
+#endif
 
 #ifndef CONFIG_ARM64
 /* Defines for SPL */
index 495d18555f3faf77430818361811314d66ee417a..1c8772a117e4ca7775379803f74a9e76e175b5dd 100644 (file)
  */
 #define V_NS16550_CLK          408000000       /* 408MHz (pllp_out0) */
 
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_STACKBASE       0x82800000      /* 40MB */
-
 /*-----------------------------------------------------------------------
  * Physical Memory Map
  */
index 93c9455e8ff322013938b3bfb360f1ff691c7b99..35735f3b78e48433438112b1f47fe2d398593f98 100644 (file)
  */
 #define V_NS16550_CLK          408000000       /* 408MHz (pllp_out0) */
 
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_STACKBASE       0x82800000      /* 40MB */
-
 /*-----------------------------------------------------------------------
  * Physical Memory Map
  */