#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;
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");
#define CONFIG_SYS_BOOTM_LEN (64 << 20)
#endif
-__weak void board_spl_fit_post_load(ulong load_addr, size_t length)
+__weak void board_spl_fit_post_load(const void *fit)
{
}
spl_image->flags |= SPL_FIT_FOUND;
#ifdef CONFIG_IMX_HAB
- board_spl_fit_post_load((ulong)fit, size);
+ board_spl_fit_post_load(fit);
#endif
return 0;
/**
* board_spl_fit_post_load - allow process images after loading finished
- *
+ * @fit: Pointer to a valid Flattened Image Tree blob
*/
-void board_spl_fit_post_load(ulong load_addr, size_t length);
+void board_spl_fit_post_load(const void *fit);
/**
* board_spl_fit_size_align - specific size align before processing payload