[U-Boot] [PATCH] mx7dsabresd: Print secure/non-secure mode info

Fabio Estevam festevam at gmail.com
Fri Jul 29 01:49:46 CEST 2016


From: Fabio Estevam <fabio.estevam at nxp.com>

mx7dsabresd has two targets:

- mx7dsabresd_defconfig: boots in non-secure mode
- mx7dsabresd_secure_defconfig: boots in secure mode

Print the mode that is being used to help users to easily identify
which target is running on the board.

Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
---
 board/freescale/mx7dsabresd/mx7dsabresd.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 1f4fc03..3098e1a 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -609,7 +609,14 @@ int board_late_init(void)
 
 int checkboard(void)
 {
-	puts("Board: i.MX7D SABRESD\n");
+	char *mode;
+
+	if (IS_ENABLED(CONFIG_ARMV7_BOOT_SEC_DEFAULT))
+		mode = "secure";
+	else
+		mode = "non-secure";
+
+	printf("Board: i.MX7D SABRESD in %s mode\n", mode);
 
 	return 0;
 }
-- 
1.9.1



More information about the U-Boot mailing list