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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74784 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Tarun Tuli <taruntuli@google.com> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Reviewed-by: Himanshu Sahdev <himanshu.sahdev@intel.com>
This commit is contained in:
parent
da7d00ef21
commit
25d100243c
|
@ -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 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue