aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBreno Lima <breno.lima@nxp.com>2021-03-25 17:30:10 +0800
committerStefano Babic <sbabic@denx.de>2021-04-08 09:18:29 +0200
commit1d756add3c478f3fe79ed36aa86b2447949879b3 (patch)
tree60a62eeca4ef76c66c4d16329c1365b3904a3230 /arch
parent1dc295148a93bc5b856b8b964079b54ea7f29514 (diff)
downloadu-boot-1d756add3c478f3fe79ed36aa86b2447949879b3.zip
u-boot-1d756add3c478f3fe79ed36aa86b2447949879b3.tar.gz
u-boot-1d756add3c478f3fe79ed36aa86b2447949879b3.tar.bz2
imx: hab: Enable hab.c to authenticate additional images in open configuration
Currently it's not possible to authenticate additional boot images in HAB open configuration. The hab.c code is checking if the SEC_CONFIG[1] fuse is programmed prior to calling the hab_authenticate_image() API function. Users cannot check if their additional boot images has been correctly signed prior to closing their device. Enable hab.c to authenticate additional boot images in open mode so HAB events can be retrieved through get_hab_status() function. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/hab.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index bd00d4a..01ddfab 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -794,10 +794,8 @@ int imx_hab_authenticate_image(uint32_t ddr_start, uint32_t image_size,
struct ivt *ivt;
enum hab_status status;
- if (!imx_hab_is_enabled()) {
+ if (!imx_hab_is_enabled())
puts("hab fuse not enabled\n");
- return 0;
- }
printf("\nAuthenticate image from DDR location 0x%x...\n",
ddr_start);
@@ -896,7 +894,7 @@ hab_exit_failure_print_status:
hab_authentication_exit:
- if (load_addr != 0)
+ if (load_addr != 0 || !imx_hab_is_enabled())
result = 0;
return result;