#include <asm/global_data.h>
#include <linux/compiler.h>
#include <asm/mach-types.h>
+#if defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
+#include <asm/armv7.h>
+#endif
#ifndef CONFIG_SPL_DM
/* Pointer to as well as the global data structure for SPL */
image_entry_arg_t image_entry =
(image_entry_arg_t)(uintptr_t) spl_image->entry_point;
cleanup_before_linux();
+#if defined(CONFIG_BOOTM_OPTEE) && defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
+ if (spl_image->optee_addr)
+ boot_jump_linux_via_optee((void *)(spl_image->entry_point),
+ machid,
+ (u32)(spl_image->arg),
+ spl_image->optee_addr);
+#endif
image_entry(0, machid, spl_image->arg);
}
#endif /* CONFIG_ARM64 */
return !strcmp(type, "fpga");
}
+static void spl_fit_image_record_arm32_optee(const void *fit, int node,
+ struct spl_image_info *spl_image,
+ struct spl_image_info *image_info)
+{
+#if defined(CONFIG_BOOTM_OPTEE) && defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
+ const char *type = fdt_getprop(fit, node, FIT_TYPE_PROP, NULL);
+
+ if (!type)
+ return;
+
+ if (strcmp(type, "tee"))
+ return;
+
+ spl_image->optee_addr = image_info->load_addr;
+#endif
+}
+
static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os)
{
if (!CONFIG_IS_ENABLED(FIT_IMAGE_TINY) || CONFIG_IS_ENABLED(OS_BOOT))
image_info.entry_point != FDT_ERROR)
spl_image->entry_point = image_info.entry_point;
+ spl_fit_image_record_arm32_optee(ctx.fit, node, spl_image,
+ &image_info);
+
/* Record our loadables into the FDT */
if (!CONFIG_IS_ENABLED(FIT_IMAGE_TINY) &&
xpl_get_fdt_update(info) && spl_image->fdt_addr)