}
#endif /* CONFIG_ARM64 */
#endif
+
+#if CONFIG_IS_ENABLED(OPTEE_IMAGE)
+void __noreturn jump_to_image_optee(struct spl_image_info *spl_image)
+{
+ /* flush and turn off caches before jumping to OPTEE */
+ cleanup_before_linux();
+
+ spl_optee_entry(NULL, NULL, spl_image->fdt_addr,
+ (void *)spl_image->entry_point);
+}
+#endif
{
}
+#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! */
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)
*/
void __noreturn jump_to_image_linux(struct spl_image_info *spl_image);
+/**
+ * jump_to_image_linux() - Jump to OP-TEE OS from SPL
+ *
+ * This jumps into OP-TEE OS using the information in @spl_image.
+ *
+ * @spl_image: Image description to set up
+ */
+void __noreturn jump_to_image_optee(struct spl_image_info *spl_image);
+
/**
* spl_start_uboot() - Check if SPL should start the kernel or U-Boot
*
* @arg2: device tree address, (ARMv7 standard bootarg #2)
* @arg3: non-secure entry address (ARMv7 bootarg #0)
*/
-void spl_optee_entry(void *arg0, void *arg1, void *arg2, void *arg3);
+void __noreturn spl_optee_entry(void *arg0, void *arg1, void *arg2, void *arg3);
/**
* spl_invoke_opensbi - boot using a RISC-V OpenSBI image