summaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra132/addressmap.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2014-07-15 10:53:29 -0500
committerMarc Jones <marc.jones@se-eng.com>2015-03-12 23:58:56 +0100
commitbc3019cbd2081370ca0c556e10f923f0da6784d9 (patch)
tree91ff9468131706074466c321435df9bc9d3802cf /src/soc/nvidia/tegra132/addressmap.c
parentd08057aa20d8dff404ba9121a5d2052ae6575356 (diff)
t132: handle optional Trust Zone region correctly
Provide a default Trust Zone region size of 1MiB, and correctly account for it in the AVP and the arm64 cores. The different path between the arm64 cores and the AVP is because the AVP cannot access the Trust Zone region registers. Therefore the AVP needs to account for the Trust Zone region. BUG=chrome-os-partner:30572 BRANCH=None TEST=Built and ran. Noted Trust Zone region being accounted for. Original-Change-Id: Ie0f117ec7a5ff8519c39778d3cdf88c3eee57ea5 Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/208062 Original-Reviewed-by: Tom Warren <twarren@nvidia.com> Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org> (cherry picked from commit 22f2fa05c009c58f53b99b9ebe1b6d01fdac5ba7) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I28506b4401145d366b56126b2eddc4c3d3db7b44 Reviewed-on: http://review.coreboot.org/8639 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc/nvidia/tegra132/addressmap.c')
-rw-r--r--src/soc/nvidia/tegra132/addressmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/nvidia/tegra132/addressmap.c b/src/soc/nvidia/tegra132/addressmap.c
index bb35a878e6..7f6d7c3d72 100644
--- a/src/soc/nvidia/tegra132/addressmap.c
+++ b/src/soc/nvidia/tegra132/addressmap.c
@@ -147,6 +147,14 @@ uintptr_t framebuffer_attributes(size_t *size_mib)
/* Place the framebuffer just below the 32-bit addressable limit. */
memory_range_by_bits(ADDRESS_SPACE_32_BIT, &begin, &end);
+ /*
+ * Need to take into account that the Trust Zone region is not able to
+ * be read by the AVP. The Trust Zone region will live just below the
+ * rest of the carveout regions.
+ */
+ if (context_avp())
+ end -= CONFIG_TRUSTZONE_CARVEOUT_SIZE_MB;
+
*size_mib = FB_SIZE_MB;
end -= *size_mib;