@@ -311,7 +311,7 @@ ulong board_spl_fit_size_align(ulong size)
return size;
}
-void board_spl_fit_post_load(ulong load_addr, size_t length)
+int board_spl_fit_post_load(ulong load_addr, size_t length)
{
u32 offset = length - CONFIG_CSF_SIZE;
@@ -319,8 +319,10 @@ void board_spl_fit_post_load(ulong load_addr, size_t length)
offset + IVT_SIZE + CSF_PAD_SIZE,
offset)) {
puts("spl: ERROR: image authentication unsuccessful\n");
- hang();
+ return -1;
}
+
+ return 0;
}
#endif
@@ -24,8 +24,9 @@ DECLARE_GLOBAL_DATA_PTR;
#define CONFIG_SYS_BOOTM_LEN (64 << 20)
#endif
-__weak void board_spl_fit_post_load(ulong load_addr, size_t length)
+__weak int board_spl_fit_post_load(ulong load_addr, size_t length)
{
+ return 0;
}
__weak ulong board_spl_fit_size_align(ulong size)
@@ -675,11 +676,12 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
if (spl_image->entry_point == FDT_ERROR || spl_image->entry_point == 0)
spl_image->entry_point = spl_image->load_addr;
- spl_image->flags |= SPL_FIT_FOUND;
-
#ifdef CONFIG_IMX_HAB
- board_spl_fit_post_load((ulong)fit, size);
+ ret = board_spl_fit_post_load((ulong)fit, size);
+ if (ret)
+ return ret;
#endif
+ spl_image->flags |= SPL_FIT_FOUND;
return 0;
}
@@ -560,7 +560,7 @@ int board_return_to_bootrom(struct spl_image_info *spl_image,
* board_spl_fit_post_load - allow process images after loading finished
*
*/
-void board_spl_fit_post_load(ulong load_addr, size_t length);
+int board_spl_fit_post_load(ulong load_addr, size_t length);
/**
* board_spl_fit_size_align - specific size align before processing payload