diff options
author | Jun Nie <jun.nie@linaro.org> | 2019-05-08 14:38:32 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-06-11 10:42:48 +0200 |
commit | 1d3b852e52d85d96c9cd4491da3daf42e3aef760 (patch) | |
tree | 113792996cef7755dcaa15c5dcf080d4d800dc6c /board | |
parent | 79fcbde8eb57a0dfc9761c4ba167186843d7a707 (diff) | |
download | u-boot-1d3b852e52d85d96c9cd4491da3daf42e3aef760.tar.gz u-boot-1d3b852e52d85d96c9cd4491da3daf42e3aef760.tar.bz2 u-boot-1d3b852e52d85d96c9cd4491da3daf42e3aef760.zip |
pico-imx7d: Reserve region of memory to OPTEE
Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size so that
the OPTEE memory is not override during u-boot relocation.
Note the OPTEE live in the end part of DRAM and OPTEE boot process will
itself subtract the DRAM region it lives in from the memory map passed
to Linux.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/technexion/pico-imx7d/pico-imx7d.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index e63b19df6e..5b357f265a 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -63,6 +63,11 @@ int dram_init(void) { gd->ram_size = imx_ddr_size(); + /* Subtract the defined OPTEE runtime firmware length */ +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; +#endif + return 0; } |