mirror of
https://xff.cz/git/u-boot/
synced 2025-10-22 10:31:56 +02:00
arm: spl: prepare for jumping to OPTEE
Make sure to (if applicable) flush the D-cache, invalidate I-cache, and disable MMU and caches before jumping to OPTEE. This fixes the SDP->SPL->OPTEE boot flow on iMX6Q and most likely on some other ARM SoCs. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
This commit is contained in:
committed by
Tom Rini
parent
d11d1becbd
commit
949eb228f3
@@ -174,6 +174,14 @@ __weak void spl_board_prepare_for_optee(void *fdt)
|
||||
{
|
||||
}
|
||||
|
||||
#if CONFIG_IS_ENABLED(OPTEE_IMAGE)
|
||||
__weak void __noreturn jump_to_image_optee(struct spl_image_info *spl_image)
|
||||
{
|
||||
spl_optee_entry(NULL, NULL, spl_image->fdt_addr,
|
||||
(void *)spl_image->entry_point);
|
||||
}
|
||||
#endif
|
||||
|
||||
__weak void spl_board_prepare_for_boot(void)
|
||||
{
|
||||
/* Nothing to do! */
|
||||
@@ -780,8 +788,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
|
||||
case IH_OS_TEE:
|
||||
debug("Jumping to U-Boot via OP-TEE\n");
|
||||
spl_board_prepare_for_optee(spl_image.fdt_addr);
|
||||
spl_optee_entry(NULL, NULL, spl_image.fdt_addr,
|
||||
(void *)spl_image.entry_point);
|
||||
jump_to_image_optee(&spl_image);
|
||||
break;
|
||||
#endif
|
||||
#if CONFIG_IS_ENABLED(OPENSBI)
|
||||
|
||||
Reference in New Issue
Block a user