summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorPrzemyslaw Marczak <p.marczak@samsung.com>2015-02-17 14:50:25 +0100
committerMinkyu Kang <mk7.kang@samsung.com>2015-03-04 21:25:35 +0900
commita0643e227ad98fbc34b1950ddc6d1d2a0f5aadad (patch)
tree665ddd310267c0dc35bc8aa8031622fd31163b98 /board
parentc8b71a35289112f77691df0d0b4a97ef19dac87b (diff)
downloadtalos-obmc-uboot-a0643e227ad98fbc34b1950ddc6d1d2a0f5aadad.tar.gz
talos-obmc-uboot-a0643e227ad98fbc34b1950ddc6d1d2a0f5aadad.zip
board: samsung: reserve memory for the secure firmware
Since more than one board requires memory reservation for the secure firmware, the reservation code can be made in a common code. Now, to reserve some part of the the last bank, board config should define: - CONFIG_TZSW_RESERVED_DRAM - len in bytes - CONFIG_NR_DRAM_BANKS - number of memory banks Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Akshay Saraswat <akshay.s@samsung.com> Cc: Hyungwon Hwang <human.hwang@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board')
-rw-r--r--board/samsung/common/board.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 97950fa192..2e17da8a7a 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -82,7 +82,13 @@ int board_init(void)
}
boot_temp_check();
#endif
+#ifdef CONFIG_TZSW_RESERVED_DRAM_SIZE
+ /* The last few MB of memory can be reserved for secure firmware */
+ ulong size = CONFIG_TZSW_RESERVED_DRAM_SIZE;
+ gd->ram_size -= size;
+ gd->bd->bi_dram[CONFIG_NR_DRAM_BANKS - 1].size -= size;
+#endif
return exynos_init();
}
OpenPOWER on IntegriCloud