diff options
author | Aneesh Bansal <aneesh.bansal@nxp.com> | 2016-01-22 16:37:28 +0530 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2016-01-27 08:13:03 -0800 |
commit | 856b284617eea5688ccf5f4655f8d70ac5ae5fbb (patch) | |
tree | 513f144ddae57ac65e5d4b617193e7878a014865 /board/freescale/common/cmd_esbc_validate.c | |
parent | d0a6d7ce55ec40d23ad96b549d596afd8f70735c (diff) |
secure_boot: change error handler for esbc_validate
In case of error while executing esbc_validate command, SNVS
transition and issue of reset is required only for secure-boot.
If boot mode is non-secure, this is not required.
Similarly, esbc_halt command which puts the core in Spin Loop
is applicable only for Secure Boot.
Signed-off-by: Aneesh Bansal <aneesh.bansal@nxp.com>
Acked-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale/common/cmd_esbc_validate.c')
-rw-r--r-- | board/freescale/common/cmd_esbc_validate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/board/freescale/common/cmd_esbc_validate.c b/board/freescale/common/cmd_esbc_validate.c index ca7c73755e..dfa3e2100e 100644 --- a/board/freescale/common/cmd_esbc_validate.c +++ b/board/freescale/common/cmd_esbc_validate.c @@ -11,6 +11,11 @@ static int do_esbc_halt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { + if (fsl_check_boot_mode_secure() == 0) { + printf("Boot Mode is Non-Secure. Not entering spin loop.\n"); + return 0; + } + printf("Core is entering spin loop.\n"); loop: goto loop; @@ -64,6 +69,6 @@ U_BOOT_CMD( U_BOOT_CMD( esbc_halt, 1, 0, do_esbc_halt, - "Put the core in spin loop ", + "Put the core in spin loop (Secure Boot Only)", "" ); |