Merge branch '2021-02-18-SPL-FIT-OP-TEE-Linux-improvements'

- Improve interactions between SPL / OP-TEE and Linux in FIT images
This commit is contained in:
Tom Rini
2021-02-18 12:02:11 -05:00
4 changed files with 142 additions and 137 deletions

View File

@@ -19,6 +19,7 @@
#include <asm/mach-imx/hab.h>
#include <asm/mach-imx/boot_mode.h>
#include <g_dnl.h>
#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -321,11 +322,11 @@ ulong board_spl_fit_size_align(ulong size)
return size;
}
void board_spl_fit_post_load(ulong load_addr, size_t length)
void board_spl_fit_post_load(const void *fit)
{
u32 offset = length - CONFIG_CSF_SIZE;
u32 offset = ALIGN(fdt_totalsize(fit), 0x1000);
if (imx_hab_authenticate_image(load_addr,
if (imx_hab_authenticate_image((uintptr_t)fit,
offset + IVT_SIZE + CSF_PAD_SIZE,
offset)) {
panic("spl: ERROR: image authentication unsuccessful\n");