From 25d100243c1eecdceb08ed0ed0efc098f5055670 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 26 Apr 2023 16:32:29 +0530 Subject: drivers/intel/fsp2_0: Apply FSP Reset Status W/A for MultiPhaseSiInit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: I749c9986e17e4cbab333b29425c9a4a4ba4128fa Reviewed-on: https://review.coreboot.org/c/coreboot/+/74784 Reviewed-by: Arthur Heymans Reviewed-by: Tarun Tuli Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal Reviewed-by: Himanshu Sahdev --- src/drivers/intel/fsp2_0/silicon_init.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/drivers/intel/fsp2_0') diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c index 678892ac5c..9505e1d56f 100644 --- a/src/drivers/intel/fsp2_0/silicon_init.c +++ b/src/drivers/intel/fsp2_0/silicon_init.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -194,6 +195,8 @@ static void do_silicon_init(struct fsp_header *hdr) 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); -- cgit v1.2.3