Skip to content
Snippets Groups Projects
Commit 7175ef4a authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Stefano Babic
Browse files

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: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: default avatarBreno Lima <breno.lima@nxp.com>
Reviewed-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
parent c727bba7
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment