[PATCH v2 14/29] ARM: lds: add support for a 2nd CSF area

Marco Felsch m.felsch at pengutronix.de
Tue Oct 17 07:51:16 PDT 2023

Extend the CSF area to be able two store two CSF slots. The 2nd CSF slot
is required in case of FlexSPI HAB boot support. The first slot is used
for the MMC-IVT + barebox-pbl; the 2nd slot is used for the FlexSPI-IVT
+ barebox-pbl. This is necessary because of the fact that the HAB ROM
code requires that the IVT is signed as well.

Make the 2nd CSF slot optional since early SRAM space is limited and 4K
can make a difference here.

Please check the documentation for a more detailed information about the
i.MX8M image layout.

Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
- add new Kconfig entry to select QSPI HAB support
- v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.felsch@pengutronix.de/T/#t

 arch/arm/lib/pbl.lds.S    | 4 ++++
 arch/arm/mach-imx/Kconfig | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
index 898d6be33b54..cafb27b2d55e 100644
--- a/arch/arm/lib/pbl.lds.S
+++ b/arch/arm/lib/pbl.lds.S
@@ -12,7 +12,11 @@
 #define BASE	(TEXT_BASE - SZ_2M)
+#define HAB_CSF_LEN	0x4000
 #define HAB_CSF_LEN	0x2000
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index c60f1f949232..6a7d90e2c853 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -750,6 +750,12 @@ config HABV4
 	  High Assurance Boot, as found on i.MX28/i.MX6/i.MX8M.
+config HABV4_QSPI
+	depends on HABV4
+	bool "HABv4 QPSI support"
+	help
+	  Enable this option to build signed QSPI/FlexSPI images.
 	depends on HAB
 	bool "Specify certificates in environment"

More information about the barebox mailing list