[U-Boot] [PATCH 1/1] Set environment location to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE.

Udit Agarwal udit.agarwal at nxp.com
Tue Mar 5 09:29:33 UTC 2019


Compiles code to set the environment location to ENVL_NOWHERE
and return when CONFIG_ENV_IS_NOWHERE is set.

Environment location is dependent on CONFIG_ENV_IS_NOWHERE config
and not on CONFIG_CHAIN_OF_TRUST.

Signed-off-by: Udit Agarwal <udit.agarwal at nxp.com>
---
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 34167cdd50..0f2a42f119 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -795,11 +795,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
 	if (prio)
 		return ENVL_UNKNOWN;
 
-#ifdef CONFIG_CHAIN_OF_TRUST
-	/* Check Boot Mode
-	 * If Boot Mode is Secure, return ENVL_NOWHERE
-	 */
-	if (fsl_check_boot_mode_secure() == 1)
+#ifdef	CONFIG_ENV_IS_NOWHERE
 		goto done;
 #endif
 
@@ -830,7 +826,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
 		break;
 	}
 
-#ifdef CONFIG_CHAIN_OF_TRUST
+#ifdef CONFIG_ENV_IS_NOWHERE
 done:
 #endif
 	return env_loc;
-- 
2.17.1



More information about the U-Boot mailing list