All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: imx: Remove arch_env_get_location to fix env lockdown
@ 2024-11-07 12:50 Abdelrahman Ibrahem
  2024-12-15  1:05 ` Peng Fan
  0 siblings, 1 reply; 4+ messages in thread
From: Abdelrahman Ibrahem @ 2024-11-07 12:50 UTC (permalink / raw)
  To: u-boot
  Cc: Abdelrahman Ibrahem, Peng Fan, Simon Glass, Stefano Babic,
	Sughosh Ganu, Tom Rini

This patch resolves an issue encountered with Layerscape SoCs, where
attempts to restrict write access to environment variables to enforce
secureboot are ineffective when using the CONFIG_ENV_IS_NOWHERE
configuration in combination with CONFIG_ENV_IS_IN_xxx.

Signed-off-by: Abdelrahman Ibrahem <mail@aibrahem.com>
---

 arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 41 -------------------------
 1 file changed, 41 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index d2d3e346a3..7dd5f429bf 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -819,47 +819,6 @@ int mmc_get_env_dev(void)
 }
 #endif
 
-enum env_location arch_env_get_location(enum env_operation op, int prio)
-{
-	enum boot_src src = get_boot_src();
-	enum env_location env_loc = ENVL_NOWHERE;
-
-	if (prio)
-		return ENVL_UNKNOWN;
-
-#ifdef	CONFIG_ENV_IS_NOWHERE
-	return env_loc;
-#endif
-
-	switch (src) {
-	case BOOT_SOURCE_IFC_NOR:
-		env_loc = ENVL_FLASH;
-		break;
-	case BOOT_SOURCE_QSPI_NOR:
-		/* FALLTHROUGH */
-	case BOOT_SOURCE_XSPI_NOR:
-		env_loc = ENVL_SPI_FLASH;
-		break;
-	case BOOT_SOURCE_IFC_NAND:
-		/* FALLTHROUGH */
-	case BOOT_SOURCE_QSPI_NAND:
-		/* FALLTHROUGH */
-	case BOOT_SOURCE_XSPI_NAND:
-		env_loc = ENVL_NAND;
-		break;
-	case BOOT_SOURCE_SD_MMC:
-		/* FALLTHROUGH */
-	case BOOT_SOURCE_SD_MMC2:
-		env_loc =  ENVL_MMC;
-		break;
-	case BOOT_SOURCE_I2C1_EXTENDED:
-		/* FALLTHROUGH */
-	default:
-		break;
-	}
-
-	return env_loc;
-}
 #endif	/* CONFIG_TFABOOT */
 
 u32 initiator_type(u32 cluster, int init_id)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-16  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 12:50 [PATCH] arm: imx: Remove arch_env_get_location to fix env lockdown Abdelrahman Ibrahem
2024-12-15  1:05 ` Peng Fan
2024-12-15 20:55   ` Abdelrahman Ibrahem
2024-12-16  8:56     ` Peng Fan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.