Skip to contentSkip to conversation

armv8: fsl-layerscape: Set env_loc to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE.

PATCH New Udit Agarwal 2 participants 2 messages Apr 23, 2019 – May 22, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 armv8: fsl-layerscape: Set env_loc to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE.

ENVL_NOWHERE is dependent on CONFIG_ENV_IS_NOWHERE and not on CONFIG_CHAIN_OF_TRUST so return ENVL_NOWHERE when CONFIG_ENV_IS_NOWHERE is enabled

---
Changes in V3:
Correct checkpatch warnings.

 arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/cpu.c +2 -9
index 54ea6b3de0..d26305ce2f 100644
@@ -799,12 +799,8 @@ 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)
-		goto done;
+#ifdef	CONFIG_ENV_IS_NOWHERE
+	return env_loc;
 #endif
 
 	switch (src) {
@@ -834,9 +830,6 @@ enum env_location env_get_location(enum env_operation op, int prio)
 		break;
 	}
 
-#ifdef CONFIG_CHAIN_OF_TRUST
-done:
-#endif
 	return env_loc;
 }
 #endif	/* CONFIG_TFABOOT */
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/1 armv8: fsl-layerscape: Set env_loc to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE.

Quoted 11 lines

-----Original Message-----
From: Udit Agarwal
Sent: Tuesday, April 23, 2019 11:36 AM
To: u-boot at lists.denx.de
Cc: Prabhakar Kushwaha <[email protected]>; Ruchika Gupta <[email protected]>; Jagdish Gediya <[email protected]>; Udit Agarwal <[email protected]>
Subject: [Patch v3] armv8: fsl-layerscape: Set env_loc to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE.

Quoted 9 lines

ENVL_NOWHERE is dependent on CONFIG_ENV_IS_NOWHERE and not on CONFIG_CHAIN_OF_TRUST so return ENVL_NOWHERE when CONFIG_ENV_IS_NOWHERE is enabled

---
Changes in V3:
Correct checkpatch warnings.

This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk