spl: imx: use trampoline buffer to load images to secure region
authorYe Li <ye.li@nxp.com>
Mon, 28 Apr 2025 10:37:36 +0000 (18:37 +0800)
committerFabio Estevam <festevam@gmail.com>
Sat, 3 May 2025 19:55:32 +0000 (16:55 -0300)
commit2f8b24d5cc34e5c4c466a29539e5a01b14423cac
tree4680e6a509b5352d1558b8981bf29ea1c5a30344
parent92f724736c8203cdf8cb6d39a2d857e5f944e54a
spl: imx: use trampoline buffer to load images to secure region

When SPL loading image to secure region, for example, ATF and tee to
DDR secure region. Because the USDHC controller is non-secure master,
it can't access this region and will cause loading issue.

So use a trampoline buffer in non-secure region, then use CPU to copy the
image from trampoline buffer to destination secure region.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/imx9/scmi/soc.c
common/spl/Kconfig
common/spl/spl_imx_container.c