Attention is currently required from: Andrey Petrov.
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74784 )
Change subject: drivers/intel/fsp2_0: Apply FSP Reset Status W/A for MultiPhaseSiInit ......................................................................
drivers/intel/fsp2_0: Apply FSP Reset Status W/A for MultiPhaseSiInit
This patch calls into fsp_get_pch_reset_status() to get the MultiPhaseSiInit API return status if FSP_MULTIPHASE_SI_INIT_RETURN_BROKEN is enabled.
Ideally FSP API should be able to return the status (both success and error code) upon exiting the FSP API but unfortunately there are some scenarios in ADL/RPL FSP where MultiPhaseSiInit API is unable to return any ERROR status. Hence, this function can be considered as an additional hook to read the FSP reset status by reading the dedicated HOB without relying on the FSP API exit status code.
Any SoC platform that selects the FSP_MULTIPHASE_SI_INIT_RETURN_BROKEN config will call into this newly added API to get the FSP return status from MultiPhaseSiInit.
BUG=b:278665768 TEST=Able to select FSP_MULTIPHASE_SI_INIT_RETURN_BROKEN for ADL/RPL SoC code and call into this API to know the return status from MultiPhaseSiInit FSP API.
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I749c9986e17e4cbab333b29425c9a4a4ba4128fa --- M src/drivers/intel/fsp2_0/silicon_init.c 1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/74784/1
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c index 678892a..9505e1d 100644 --- a/src/drivers/intel/fsp2_0/silicon_init.c +++ b/src/drivers/intel/fsp2_0/silicon_init.c @@ -10,6 +10,7 @@ #include <fsp/api.h> #include <fsp/util.h> #include <program_loading.h> +#include <soc/intel/common/reset.h> #include <soc/intel/common/vbt.h> #include <stage_cache.h> #include <string.h> @@ -194,6 +195,8 @@ multi_phase_params.phase_index = i; multi_phase_params.multi_phase_param_ptr = NULL; status = multi_phase_si_init(&multi_phase_params); + if (CONFIG(FSP_MULTIPHASE_SI_INIT_RETURN_BROKEN)) + status = fsp_get_pch_reset_status(); fsps_return_value_handler(FSP_MULTI_PHASE_SI_INIT_EXECUTE_PHASE_API, status); } timestamp_add_now(TS_FSP_MULTI_PHASE_SI_INIT_END);