summaryrefslogtreecommitdiff
path: root/board/warp7/warp7.c
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2018-04-24 18:46:35 +0100
committerStefano Babic <sbabic@denx.de>2018-04-26 08:52:51 +0200
commit7175ef4a71e01fe416845a7ecb9af2dfa201cc87 (patch)
treeb1fa950f19e531538627543b571928db044a93ad /board/warp7/warp7.c
parentc727bba74a44dd49d71fa3fab9f57ed1e0c277d3 (diff)
downloadu-boot-7175ef4a71e01fe416845a7ecb9af2dfa201cc87.tar.gz
u-boot-7175ef4a71e01fe416845a7ecb9af2dfa201cc87.tar.bz2
u-boot-7175ef4a71e01fe416845a7ecb9af2dfa201cc87.zip
warp7: Allocate specific region of memory to OPTEE
Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size. On WaRP7 we simply define the OPTEE region as from the maximum DRAM address minus CONFIG_OPTEE_TZDRAM_SIZE bytes. Note the OPTEE boot process will itself subtract the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Diffstat (limited to 'board/warp7/warp7.c')
-rw-r--r--board/warp7/warp7.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 0d3d324571..56f0cdd175 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -58,6 +58,11 @@ int dram_init(void)
{
gd->ram_size = PHYS_SDRAM_SIZE;
+ /* Subtract the defined OPTEE runtime firmware length */
+#ifdef CONFIG_OPTEE_TZDRAM_SIZE
+ gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE;
+#endif
+
return 0;
}