Jérémy Compostella has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80691?usp=email )
Change subject: drivers/intel/fsp2_0: Initialize CPUs only when FSP-S has completed ......................................................................
drivers/intel/fsp2_0: Initialize CPUs only when FSP-S has completed
FSP can also make use of Multi-Processor services during its multi-phase stages. If `USE_INTEL_FSP_MP_INIT' is set and `USE_INTEL_FSP_TO_CALL_COREBOOT_PUBLISH_MP_PPI' unset coreboot cannot take MP ownership as FSP-S may still use EDK2 MP services concurrently.
TEST=verified on Lunar Lake RVP board (lnlrvp)
Change-Id: If0397f5cc8d0f4f1872bd37a001fe42e0c37ec92 Signed-off-by: Jeremy Compostella jeremy.compostella@intel.com --- M src/drivers/intel/fsp2_0/silicon_init.c 1 file changed, 8 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/80691/1
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c index e543628..39c3752 100644 --- a/src/drivers/intel/fsp2_0/silicon_init.c +++ b/src/drivers/intel/fsp2_0/silicon_init.c @@ -155,16 +155,12 @@ fsp_debug_after_silicon_init(status); fsps_return_value_handler(FSP_SILICON_INIT_API, status);
- /* Reinitialize CPUs if FSP-S has done MP Init */ - if (CONFIG(USE_INTEL_FSP_MP_INIT)) - do_mpinit_after_fsp(); - if (!CONFIG(PLATFORM_USES_FSP2_2)) - return; + goto fsp_init_done;
/* Check if SoC user would like to call Multi Phase Init */ if (!fsp_is_multi_phase_init_enabled()) - return; + goto fsp_init_done;
/* Call MultiPhaseSiInit */ multi_phase_si_init = (void *)(uintptr_t)(hdr->image_base + @@ -172,7 +168,7 @@
/* Implementing multi_phase_si_init() is optional as per FSP 2.2 spec */ if (multi_phase_si_init == NULL) - return; + goto fsp_init_done;
post_code(POSTCODE_FSP_MULTI_PHASE_SI_INIT_ENTRY); timestamp_add_now(TS_FSP_MULTI_PHASE_SI_INIT_START); @@ -202,6 +198,11 @@ } timestamp_add_now(TS_FSP_MULTI_PHASE_SI_INIT_END); post_code(POSTCODE_FSP_MULTI_PHASE_SI_INIT_EXIT); + +fsp_init_done: + /* Reinitialize CPUs if FSP-S has done MP Init */ + if (CONFIG(USE_INTEL_FSP_MP_INIT)) + do_mpinit_after_fsp(); }
static void *fsps_allocator(void *arg_unused, size_t size, const union cbfs_mdata *mdata_unused)