diff options
author | Tim Chu <Tim.Chu@quantatw.com> | 2022-12-14 11:37:55 +0000 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-03-22 12:05:47 +0000 |
commit | d5bd8d54a32143c7d126a406eec1c3bcbf0240f5 (patch) | |
tree | e38b8fec51be409d62f2c302cf669e28f931907a /src/soc | |
parent | 65b7219bd3383d7b92afa1f081d46531077e1c14 (diff) |
soc/intel/xeon_sp: Enable FSP_ERROR_INFO_HOB handling
After calling FSP MemoryInit API, if there is an error, some FSPs
(such as SPR-SP FSP) is capable of generating FSP_ERROR_INFO_HOB.
Check existence of such a HOB and handle it accordingly.
Change-Id: Icb5c31daa223ba6b06ba1b2de4f8808e0b27899e
Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72505
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/xeon_sp/include/soc/romstage.h | 1 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/romstage.c | 10 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/spr/include/soc/soc_util.h | 4 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/spr/romstage.c | 5 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/spr/soc_util.c | 14 |
5 files changed, 11 insertions, 23 deletions
diff --git a/src/soc/intel/xeon_sp/include/soc/romstage.h b/src/soc/intel/xeon_sp/include/soc/romstage.h index a2adfed918..2fd8128918 100644 --- a/src/soc/intel/xeon_sp/include/soc/romstage.h +++ b/src/soc/intel/xeon_sp/include/soc/romstage.h @@ -10,5 +10,6 @@ void mainboard_memory_init_params(FSPM_UPD * mupd); void mainboard_rtc_failed(void); void save_dimm_info(void); void mainboard_ewl_check(void); +void mainboard_fsp_error_handle(void); #endif /* _SOC_ROMSTAGE_H_ */ diff --git a/src/soc/intel/xeon_sp/romstage.c b/src/soc/intel/xeon_sp/romstage.c index d001d61ece..e57ba4554a 100644 --- a/src/soc/intel/xeon_sp/romstage.c +++ b/src/soc/intel/xeon_sp/romstage.c @@ -17,6 +17,13 @@ void mainboard_romstage_entry(void) printk(BIOS_DEBUG, "coreboot fsp_memory_init finished...\n"); mainboard_ewl_check(); + if (CONFIG(ENABLE_FSP_ERROR_INFO)) { + if (fsp_display_error_info()) { + mainboard_fsp_error_handle(); + die("ERROR: FSP reported an error(s) after running!"); + } + } + unlock_pam_regions(); save_dimm_info(); @@ -33,3 +40,6 @@ __weak void mainboard_rtc_failed(void) } __weak void save_dimm_info(void) { } __weak void mainboard_ewl_check(void) { } + +/* mainboard can override this function for their own handling, such as writing a BMC SEL. */ +__weak void mainboard_fsp_error_handle(void) { } diff --git a/src/soc/intel/xeon_sp/spr/include/soc/soc_util.h b/src/soc/intel/xeon_sp/spr/include/soc/soc_util.h index 4539991d55..c96103059a 100644 --- a/src/soc/intel/xeon_sp/spr/include/soc/soc_util.h +++ b/src/soc/intel/xeon_sp/spr/include/soc/soc_util.h @@ -29,8 +29,4 @@ const EWL_PRIVATE_DATA *get_ewl_hob(void); uint32_t get_ubox_busno(uint32_t socket, uint8_t offset); uint32_t get_socket_ubox_busno(uint32_t socket); -void check_fsp_error(void); - -void mainboard_fsp_error_handle(void); - #endif /* _SOC_UTIL_H_ */ diff --git a/src/soc/intel/xeon_sp/spr/romstage.c b/src/soc/intel/xeon_sp/spr/romstage.c index b49972eee1..fe98f38781 100644 --- a/src/soc/intel/xeon_sp/spr/romstage.c +++ b/src/soc/intel/xeon_sp/spr/romstage.c @@ -312,8 +312,3 @@ void save_dimm_info(void) mem_info->dimm_cnt = index; /* Number of DIMM slots found */ printk(BIOS_DEBUG, "%d Installed DIMMs found\n", dimm_num); } - -void fsp_check_for_error(void) -{ - check_fsp_error(); -} diff --git a/src/soc/intel/xeon_sp/spr/soc_util.c b/src/soc/intel/xeon_sp/spr/soc_util.c index 053b3ebeca..f8d40e3bea 100644 --- a/src/soc/intel/xeon_sp/spr/soc_util.c +++ b/src/soc/intel/xeon_sp/spr/soc_util.c @@ -153,20 +153,6 @@ uint32_t get_socket_ubox_busno(uint32_t socket) return get_ubox_busno(socket, UNCORE_BUS_1); } -/* mainboard can override this function for their own handling, such as write a BMC SEL. */ -void __weak mainboard_fsp_error_handle(void) -{ - die("ERROR: FSP reported an error(s) after running!"); -} - -void check_fsp_error(void) -{ - bool fsp_found_error = fsp_find_error_info(); - - if (fsp_found_error) - mainboard_fsp_error_handle(); -} - void bios_done_msr(void *unused) { msr_t msr = rdmsr(MSR_BIOS_DONE); |