Commit 1d3b852e52d85d96c9cd4491da3daf42e3aef760

Authored by Jun Nie
Committed by Stefano Babic
1 parent 79fcbde8eb

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>

Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff

board/technexion/pico-imx7d/pico-imx7d.c
... ... @@ -63,6 +63,11 @@
63 63 {
64 64 gd->ram_size = imx_ddr_size();
65 65  
  66 + /* Subtract the defined OPTEE runtime firmware length */
  67 +#ifdef CONFIG_OPTEE_TZDRAM_SIZE
  68 + gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE;
  69 +#endif
  70 +
66 71 return 0;
67 72 }
68 73