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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
Changelog:
v2:
- add new Kconfig entry to select QSPI HAB support
- v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.felsch@xxxxxxxxxxxxxx/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)
 #endif
 
+#ifdef CONFIG_HABV4_QSPI
+#define HAB_CSF_LEN	0x4000
+#else
 #define HAB_CSF_LEN	0x2000
+#endif
 
 OUTPUT_FORMAT(BAREBOX_OUTPUT_FORMAT)
 OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
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
 	help
 	  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.
+
 config HAB_CERTS_ENV
 	depends on HAB
 	bool "Specify certificates in environment"
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux