summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sun <jian.sun@freescale.com>2012-07-13 15:30:57 +0800
committerJustin Waters <justin.waters@timesys.com>2012-09-12 11:05:52 -0400
commitffc2b989b5fbcbcbc3348f151428d16d38665798 (patch)
tree5bf0c3871121ed99c2994cfbaf2fe71d4cb9c221
parent2d74e107dd5f7a520b83b8061223797b4c244dd0 (diff)
ENGR00217114-2 MX6 U-Boot, Secure Boot, one code base for MX6Q/DL/SL
Move the uImage authentication to an earlier phase, in this way prevent DDR content changed by OS load code, causing authentication failure. Signed-off-by: Eric Sun <jian.sun@freescale.com>
-rw-r--r--common/cmd_bootm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 33f10126d7..618579e102 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -595,17 +595,18 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return do_bootm_subcommand(cmdtp, flag, argc, 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) {
+ extern uint32_t authenticate_image(void);
+ if (authenticate_image() == 0) {
printf("Authenticate UImage Fail, Please check\n");
return 1;
}
+
#endif
+ if (bootm_start(cmdtp, flag, argc, argv))
+ return 1;
+
/*
* We have reached the point of no return: we are going to
* overwrite all exception vector code, so we cannot easily