summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/board_f.c')
-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 b40735438b..bd5a486248 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -324,6 +324,15 @@ static int setup_dest_addr(void)
* Ram is setup, size stored in gd !!
*/
debug("Ram size: %08lX\n", (ulong)gd->ram_size);
+#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
+ /* Reserve memory for secure MMU tables, and/or security monitor */
+ gd->ram_size -= CONFIG_SYS_MEM_RESERVE_SECURE;
+ /*
+ * Record secure memory location. Need recalcuate if memory splits
+ * into banks, or the ram base is not zero.
+ */
+ gd->secure_ram = gd->ram_size;
+#endif
#if defined(CONFIG_SYS_MEM_TOP_HIDE)
/*
* Subtract specified amount of memory to hide so that it won't