From: Bryan O'Donoghue Date: Fri, 12 Jan 2018 12:40:15 +0000 (+0000) Subject: arm: imx: hab: Make authenticate_image() return zero on open boards X-Git-Tag: v2018.03-rc1~176^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4467ae6c28aa7eef84d5784f56234472a015d5e2;p=platform%2Fkernel%2Fu-boot.git arm: imx: hab: Make authenticate_image() return zero on open boards The BootROM will not successfully process a HAB image passed by u-boot unless the board has been set into locked mode. Some of the existing usages of authenticate_image() expect and rely on unlocked boards doing the following 1. Not calling into the BootROM authenticate_image() callback 2. Returning a pass status for authenticate_image() calls anyway A previous patch removed the necessity to call into imx_hab_is_enabled() twice. This patch ensures the reliance on authenticate_image() returning zero is maintained. Signed-off-by: Bryan O'Donoghue Suggested-by: Breno Matheus Lima Cc: Stefano Babic Cc: Fabio Estevam Cc: Peng Fan Cc: Albert Aribaud Cc: Sven Ebenfeld Cc: George McCollister Tested-by: Breno Lima --- diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index d917ac3..3b19a7e 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -458,7 +458,7 @@ int imx_hab_authenticate_image(uint32_t ddr_start, uint32_t image_size, if (!imx_hab_is_enabled()) { puts("hab fuse not enabled\n"); - return result; + return 0; } printf("\nAuthenticate image from DDR location 0x%x...\n",