Skip to content

Commit

Permalink
ARM: tegra: avoid using secure carveout RAM
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tom Warren <[email protected]>
  • Loading branch information
nvswarren authored and tomcwarren committed Jul 26, 2018
1 parent 74c69cd commit 6e584e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-tegra/board2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e584e6

Please sign in to comment.