Skip to contentSkip to conversation

arch: arm: mach-socfpga: To notify SDM when SPL pass control to U-Boot

PATCH In review Jit Loon Lim 2 participants 2 messages Aug 30, 2022 – Sep 9, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch: arm: mach-socfpga: To notify SDM when SPL pass control to U-Boot

From: Chin Liang See <[email protected]>

Prior SPL pass control to U-Boot, SPL will send a mailbox command "HPS_STAGE_NOTIFY" to notify Secure Device Manager (SDM) on HPS SW transition.

The purpose is for debug as user can query SDM on HPS error details when HPS enters a warm reset due to error such as watchdog.

---
 arch/arm/mach-socfpga/spl_s10.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach-socfpga/spl_s10.c +6 -0
index c20e87cdbe..9bfd1a0f6a 100644
@@ -92,3 +92,9 @@ void board_init_f(ulong dummy)
 	mbox_qspi_open();
 #endif
 }
+
+/* board specific function prior loading SSBL / U-Boot */
+void spl_board_prepare_for_boot(void)
+{
+	mbox_hps_stage_notify(HPS_EXECUTION_STATE_SSBL);
+}
Signature · 1 line
2.26.2
#1 lore raw
Quoted 38 lines

-----Original Message-----
From: Lim, Jit Loon <[email protected]>
Sent: Tuesday, 30 August, 2022 11:52 PM
To: [email protected]
Cc: Jagan Teki <[email protected]>; Vignesh R <[email protected]>; Vasut, Marek <[email protected]>; Simon <[email protected]>; Chee, Tien Fong <[email protected]>; Hea, Kok Kiang <[email protected]>; Lim, Elly Siew Chin <[email protected]>; Kho, Sin Hui <[email protected]>; Lokanathan, Raaj <[email protected]>; Maniyam, Dinesh <[email protected]>; Ng, Boon Khai <[email protected]>; Yuslaimi, Alif Zakuan <[email protected]>; Chong, Teik Heng <[email protected]>; Zamri, Muhammad Hazim Izzat <[email protected]>; Tang, Sieu Mun <[email protected]>; Lim, Jit Loon <[email protected]>; Chin Liang See <[email protected]>
Subject: [PATCH] arch: arm: mach-socfpga: To notify SDM when SPL pass control to U-Boot

From: Chin Liang See <[email protected]>

Prior SPL pass control to U-Boot, SPL will send a mailbox command "HPS_STAGE_NOTIFY" to notify Secure Device Manager (SDM) on HPS SW transition.

The purpose is for debug as user can query SDM on HPS error details when HPS enters a warm reset due to error such as watchdog.

---
 arch/arm/mach-socfpga/spl_s10.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach- renamed from arch/arm/mach-socfpga/spl_s10.c +0 -0

socfpga/spl_s10.c index c20e87cdbe..9bfd1a0f6a 100644

arch/arm/mach-socfpga/spl_s10.c void board_init_f(ulong dummy) · line 99

Quoted 8 lines
arch/arm/mach-socfpga/spl_s10.c +5 -0
@@ -92,3 +92,9 @@ void board_init_f(ulong dummy)
 	mbox_qspi_open();
 #endif
 }
+
+/* board specific function prior loading SSBL / U-Boot */ void
+spl_board_prepare_for_boot(void) {
+	mbox_hps_stage_notify(HPS_EXECUTION_STATE_SSBL);
+}

You should put this notify into spl_perform_fixups(), so this can used by both boot flows:
SPL -> U-Boot and SPL -> ATF -> U-Boot.

Regards
Tien Fong