summaryrefslogtreecommitdiff
path: root/cmd/bootz.c
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-03-08 22:03:47 +0800
committerYe Li <ye.li@nxp.com>2020-04-26 23:20:31 -0700
commit6452f9d6126c09f20f7070eaa3b4007b85d0fd66 (patch)
tree2e8645c05da922dc49dae99ce8d06ad5c0c747f9 /cmd/bootz.c
parentdd0ab2e777ba06e564ddcb692f651ca9aa605700 (diff)
MLK-12500-1 HAB: Add kernel image authentication in image loading
To support the trust boot chain, we integrate the authentication into the kernel image loading process. The kernel image will be verified at its load address. So when signing the kernel image, we need to use this load address which may change on different platforms. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 3c118b8d6bbe1a25ca8c8bafeb528309f16fc73d) (cherry picked from commit fd9a9759ed9b3a9fc26b18aff00880382213b1ca) (cherry picked from commit 98d4faefdb83579d4a5a170e06af5efb64ad2b3c) (cherry picked from commit 3c0f0eed6cb703cd7d67ec97520b1990b5e35fb2)
Diffstat (limited to 'cmd/bootz.c')
-rw-r--r--cmd/bootz.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/bootz.c b/cmd/bootz.c
index f14a5fefbf..098d7c833d 100644
--- a/cmd/bootz.c
+++ b/cmd/bootz.c
@@ -56,6 +56,14 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
if (bootm_find_images(flag, argc, argv))
return 1;
+#ifdef CONFIG_IMX_HAB
+ extern int authenticate_image(
+ uint32_t ddr_start, uint32_t raw_image_size);
+ if (authenticate_image(images->ep, zi_end - zi_start) != 0) {
+ printf("Authenticate zImage Fail, Please check\n");
+ return 1;
+ }
+#endif
return 0;
}