[Skiboot] [PATCH v2 1/3] init, occ: Initialise OCC earlier on BMC systems

Shilpasri G Bhat shilpa.bhat at linux.vnet.ibm.com
Wed Jun 20 15:32:16 AEST 2018



On 06/20/2018 09:19 AM, Andrew Donnellan wrote:
> We need to use the OCC to obtain presence data for the SXM2 slots on
> Witherspoon systems. This is needed to determine device type for NVLink
> GPUs and OpenCAPI devices which can be plugged into the same slot. Support
> for this will be implemented in a future patch.
> 
> Currently, OCC initialisation is done just before handing over to Linux,
> which is well after NPU probe. On FSP systems, OCC boot starts very late,
> so we wait until the last possible moment to initialise the skiboot side in
> order to give it the maximum time to boot. On BMC systems, OCC boot starts
> earlier, so there aren't any issues in moving it earlier in the skiboot
> init sequence.
> 
> When running on a BMC machine, call occ_pstates_init() as early as
> possible in the init sequence. On FSP machines, continue to call it from
> its current location.
> 
> Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> 
> ---
> 
> v1->v2:
> 
>  - Change check to rely on BMC vs FSP rather than POWER8 vs POWER9 (thanks
>    Shilpa)

Thanks for making the change.

Reviewed-by: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>

> ---
>  core/init.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/core/init.c b/core/init.c
> index 1ad747e77e4a..272a57a145ee 100644
> --- a/core/init.c
> +++ b/core/init.c
> @@ -505,7 +505,8 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
>  
>  	ipmi_set_fw_progress_sensor(IPMI_FW_OS_BOOT);
>  
> -	occ_pstates_init();
> +	if (fsp_present())
> +		occ_pstates_init();
>  
>  	if (!is_reboot) {
>  		/* We wait for the nvram read to complete here so we can
> @@ -1079,6 +1080,17 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
>  
>  	op_display(OP_LOG, OP_MOD_INIT, 0x0002);
>  
> +	/*
> +	 * On some POWER9 BMC systems, we need to initialise the OCC
> +	 * before the NPU to facilitate NVLink/OpenCAPI presence
> +	 * detection, so we set it up as early as possible. On FSP
> +	 * systems, Hostboot starts booting the OCC later, so we delay
> +	 * OCC initialisation as late as possible to give it the
> +	 * maximum time to boot up.
> +	 */
> +	if (!fsp_present())
> +		occ_pstates_init();
> +
>  	pci_nvram_init();
>  
>  	preload_io_vpd();
> 



More information about the Skiboot mailing list