> -----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.
> 
> Signed-off-by: Jit Loon Lim <[email protected]>
> ---
>  arch/arm/mach-socfpga/spl_s10.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-
> socfpga/spl_s10.c index c20e87cdbe..9bfd1a0f6a 100644
> --- a/arch/arm/mach-socfpga/spl_s10.c
> +++ b/arch/arm/mach-socfpga/spl_s10.c
> @@ -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

Reply via email to