aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board2.c
diff options
context:
space:
mode:
authorStephen Warren2018-06-22 13:03:19 -0600
committerTom Warren2018-07-26 13:15:30 -0700
commit6e584e633d1072a37493aed3314065b57ef9d991 (patch)
tree76fec3f15673ed744e8dedecd5eb750c16606e66 /arch/arm/mach-tegra/board2.c
parent74c69cdcc01694b9c08194f2c0fc49f53e766810 (diff)
ARM: tegra: avoid using secure carveout RAM
If a secure carveout exists, U-Boot cannot use that memory. Fix carveout_size() to reflect this, and hence transitively fix usable_ram_size_below_4g() and board_get_usable_ram_top(). This change ensures that when U-Boot copies the secure monitor code to install it, the copy target is not in-use for U-Boot code/data. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board2.c')
-rw-r--r--arch/arm/mach-tegra/board2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 25da771607b..5ecadf705e7 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -249,6 +249,10 @@ static ulong carveout_size(void)
{
#ifdef CONFIG_ARM64
return SZ_512M;
+#elif defined(CONFIG_ARMV7_SECURE_RESERVE_SIZE)
+ // BASE+SIZE might not == 4GB. If so, we want the carveout to cover
+ // from BASE to 4GB, not BASE to BASE+SIZE.
+ return (0 - CONFIG_ARMV7_SECURE_BASE);
#else
return 0;
#endif