MLK-22866 imx8: Remove the optee shared memory from DDR banks
authorYe Li <ye.li@nxp.com>
Tue, 29 Oct 2019 07:11:33 +0000 (00:11 -0700)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:34 +0000 (00:56 -0700)
commita3bf249e01e973c7a46fa7a61430e5518ea89a1f
treec422f7d543a9597562282fe5466ad7015ff15d2e
parent9f108b10361d3d76a6ce9213ffaaf4768ccf3f25
MLK-22866 imx8: Remove the optee shared memory from DDR banks

Optee has 4MB shared memory at its top space which was assigned to
non-secure OS partition in ATF. By default this memory is added to
u-boot DDR banks and will pass to kernel. This means kernel has possibility
to allocate from this memory for system usage. At same time this memory is
used by optee and mem-remapped by optee kernel driver. So it is possible to
have conflict and cause kernel crash.

Fix the issue by removing the shared memory from u-boot DDR banks. Then it
is not visible for both u-boot and kernel and can avoid such issue.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 164279c42de0d058b7abe198cc154ee683087e6a)
(cherry picked from commit 2c1016db0c08b8ade597146782c4267d77f77973)
arch/arm/mach-imx/imx8/cpu.c