summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEric Sun <jian.sun@freescale.com>2012-03-30 20:38:42 +0800
committerEric Sun <jian.sun@freescale.com>2012-04-01 15:19:56 +0800
commitafd98c03ab002723d589cd455fd13565921d4eae (patch)
tree220e69a48715a2bf8641cf6496844ac5b819dd1b /common
parent87a0deee1cd9c2bd6d50af03b81377a90eb07eb4 (diff)
downloadu-boot-imx-afd98c03ab002723d589cd455fd13565921d4eae.zip
u-boot-imx-afd98c03ab002723d589cd455fd13565921d4eae.tar.gz
u-boot-imx-afd98c03ab002723d589cd455fd13565921d4eae.tar.bz2
ENGR00139223-2 [MX6Q] Secure Boot, enable HAB on ARM2 platform (Stage 2)
authenticate_image is called to verify uImage when excecuting "bootm", the uImage togehter with its CSF data should has been located in DDR. The new uImage layout is as the following: +------------+ 0x0 (0x10800000) \ | Header | | +------------+ 0x40 | | | | | | | | | | | | | | Image Data | | . | | . | > Stuff to be authenticated ------+ . | | | | | | | | | | | +------------+ | | | | | | | Fill Data | | | | | | | +------------+ 0x003F_DFE0 | | | IVT | | | +------------+ 0x003F_E000 / | | | | | CSF DATA | <--------------------------------------------------------+ | | +------------+ | | | Fill Data | | | +------------+ 0x0040_0000 Signed-off-by: Eric Sun <jian.sun@freescale.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 0b45847..c9b38b5 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -598,6 +598,14 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (bootm_start(cmdtp, flag, argc, argv))
return 1;
+#ifdef CONFIG_SECURE_BOOT
+ extern uint32_t authenticate_image(ulong start);
+ if (authenticate_image(images.os.start) == 0) {
+ printf("Authenticate UImage Fail, Please check\n");
+ return 1;
+ }
+#endif
+
/*
* We have reached the point of no return: we are going to
* overwrite all exception vector code, so we cannot easily