summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYork Sun <york.sun@nxp.com>2016-06-24 16:46:19 -0700
committerYork Sun <york.sun@nxp.com>2016-07-15 09:01:43 -0700
commit50e93b95653da44b9743357dfa3701e8482fd167 (patch)
tree8db0847067eba3dffa8d67bc5ad12a6b3ff2dee0 /common
parente61a7534e33063a76e105d895e5c6317f2d0cd76 (diff)
downloadu-boot-imx-50e93b95653da44b9743357dfa3701e8482fd167.zip
u-boot-imx-50e93b95653da44b9743357dfa3701e8482fd167.tar.gz
u-boot-imx-50e93b95653da44b9743357dfa3701e8482fd167.tar.bz2
armv8: Add tlb_allocated to arch global data
When secure ram is used, MMU tables have to be put into secure ram. To use common MMU code, gd->arch.tlb_addr will be used to host TLB entry pointer. To save allocated memory for later use, tlb_allocated variable is added to global data structure. Signed-off-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 0fc96bd..a1138b0 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -432,6 +432,15 @@ static int reserve_mmu(void)
gd->arch.tlb_addr = gd->relocaddr;
debug("TLB table from %08lx to %08lx\n", gd->arch.tlb_addr,
gd->arch.tlb_addr + gd->arch.tlb_size);
+
+#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
+ /*
+ * Record allocated tlb_addr in case gd->tlb_addr to be overwritten
+ * with location within secure ram.
+ */
+ gd->arch.tlb_allocated = gd->arch.tlb_addr;
+#endif
+
return 0;
}
#endif