From 7c4789d42b022127c117083db20ad9a5bbee6466 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sat, 9 Jul 2022 22:41:48 +0000 Subject: [PATCH] soc/intel/meteorlake: Allow possible options for MP Init Ported back from commit ceaf9d116949da68aa9c ("soc/intel/alderlake: Allow possible options for MP Init") This patch creates choice that lists all possible options to perform MP Init as below for Intel Meteor Lake platform: 1. MTL_USE_FSP_MP_INIT: Allow coreboot to bring APs from reset and FSP runs feature programming based and selects MP_SERVICES_PPI_V2 config. 2. MTL_USE_COREBOOT_MP_INIT: Allow coreboot to perform MP Init (both AP init and feature programming) using native implementation. Additionally, selects required RELOAD_MICROCODE_PATCH when coreboot is expected to run MP Init. Refactor SoC code to allow required FSP UPD override based on selected MP Init option. Additionally, added `FIXME` comment to ensure Intel MTL FSP can bring back SkipMpInit UPD in MTL to let coreboot override this UPD and ensure independent MP Init flow. BUG=b:219053812 TEST=Able to build google/rex. Signed-off-by: Subrata Banik Change-Id: Ic917e4e03e24d73190cfc72c6ed8e59af427bedf Reviewed-on: https://review.coreboot.org/c/coreboot/+/65743 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/soc/intel/meteorlake/Kconfig | 19 ++++++++++++++++++- src/soc/intel/meteorlake/fsp_params.c | 16 ++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/soc/intel/meteorlake/Kconfig b/src/soc/intel/meteorlake/Kconfig index 86567dc48a..bf50ada13d 100644 --- a/src/soc/intel/meteorlake/Kconfig +++ b/src/soc/intel/meteorlake/Kconfig @@ -38,7 +38,6 @@ config CPU_SPECIFIC_OPTIONS select IOAPIC select MICROCODE_BLOB_UNDISCLOSED select MRC_SETTINGS_PROTECT - select MP_SERVICES_PPI_V2 select PARALLEL_MP_AP_WORK select PLATFORM_USES_FSP2_3 select PMC_GLOBAL_RESET_ENABLE_LOCK @@ -308,4 +307,22 @@ config SOC_INTEL_GFX_FRAMEBUFFER_OFFSET hex default 0x800000 +choice + prompt "Multiprocessor (MP) Initialization configuration to use" + default MTL_USE_FSP_MP_INIT + +config MTL_USE_FSP_MP_INIT + bool "Use FSP MP init" + select MP_SERVICES_PPI_V2 + help + Upon selection, coreboot brings APs from reset and the FSP runs feature programming. + +config MTL_USE_COREBOOT_MP_INIT + bool "Use coreboot MP init" + select RELOAD_MICROCODE_PATCH + help + Upon selection, coreboot performs MP Init. + +endchoice + endif diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c index f77182a344..39e374b9ae 100644 --- a/src/soc/intel/meteorlake/fsp_params.c +++ b/src/soc/intel/meteorlake/fsp_params.c @@ -133,9 +133,21 @@ static void fill_fsps_cpu_params(FSP_S_CONFIG *s_cfg, s_cfg->MicrocodeRegionSize = (uint32_t)microcode_len; } - /* Use coreboot MP PPI services if Kconfig is enabled */ - if (CONFIG(USE_INTEL_FSP_TO_CALL_COREBOOT_PUBLISH_MP_PPI)) + if (CONFIG(MTL_USE_FSP_MP_INIT)) { + /* + * Use FSP running MP PPI services to perform CPU feature programming + * if Kconfig is enabled + */ s_cfg->CpuMpPpi = (uintptr_t) mp_fill_ppi_services_data(); + } else { + /* Use coreboot native driver to perform MP init by default */ + s_cfg->CpuMpPpi = (uintptr_t)NULL; + /* + * FIXME: Bring back SkipMpInit UPD in MTL FSP to let coreboot perform + * AP programming independently. + */ + // s_cfg->SkipMpInit = !CONFIG(USE_INTEL_FSP_MP_INIT); + } }