[PATCH 09/11] arm: socfpga: agilex5: add agilex5_barebox_entry_xload

Michael Tretter m.tretter at pengutronix.de
Wed Oct 7 03:55:54 PDT 2026


The xload function allows to build the FSBL without piggy data and load
the SSBL from QSPI.

Signed-off-by: Michael Tretter <m.tretter at pengutronix.de>
---
 arch/arm/mach-socfpga/atf.c    | 10 ++++++++++
 include/mach/socfpga/generic.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/arch/arm/mach-socfpga/atf.c b/arch/arm/mach-socfpga/atf.c
index a59a73d1c31f..7583a20b16f5 100644
--- a/arch/arm/mach-socfpga/atf.c
+++ b/arch/arm/mach-socfpga/atf.c
@@ -128,6 +128,16 @@ static void agilex5_el3_init(void)
 	agilex5_start_image_via_tfa(bl33);
 }
 
+void __noreturn agilex5_barebox_entry_xload(void)
+{
+	/* Using xload in EL1 is not supported */
+	if (current_el() != 3)
+		hang();
+
+	agilex5_el3_init();
+	__builtin_unreachable();
+}
+
 void __noreturn agilex5_barebox_entry(void *fdt)
 {
 	phys_addr_t membase;
diff --git a/include/mach/socfpga/generic.h b/include/mach/socfpga/generic.h
index 16e117f4206c..a2a3fad58b18 100644
--- a/include/mach/socfpga/generic.h
+++ b/include/mach/socfpga/generic.h
@@ -101,6 +101,7 @@ static inline void arria10_watchdog_disable(void) {}
 
 int agilex5_clk_init(void);
 void __noreturn agilex5_barebox_entry(void *fdt);
+void __noreturn agilex5_barebox_entry_xload(void);
 
 static inline void __udelay(unsigned us)
 {

-- 
2.47.3




More information about the barebox mailing list