stm32mp1: spl: Configure TrustZone controller for OP-TEE
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Thu, 15 Jul 2021 19:19:26 +0000 (14:19 -0500)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Tue, 27 Jul 2021 07:48:11 +0000 (09:48 +0200)
commit8533263c8512d059e546dd1d0032cfecd7b1a0cf
tree0ffb9e48e9a2fd44ffe2dd090593a7f99d996e79
parent8d7f5edd869e1763babbd1005c4e06023ff10e3b
stm32mp1: spl: Configure TrustZone controller for OP-TEE

OP-TEE is very particular about how the TZC should be configured.
When booting an OP-TEE payload, an incorrect TZC configuration will
result in a panic.

Most information can be derived from the SPL devicetree. The only
information we don't have is the split between TZDRAM and shared
memory. This has to be hardcoded. The rest of the configuration is
fairly easy, and only requires 3 TZC regions. Configure them.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
arch/arm/mach-stm32mp/spl.c