Attention is currently required from: Furquan Shaikh, Tim Wawrzynczak, Paul Menzel, Angel Pons, Patrick Rudolph, EricR Lai. Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56382 )
Change subject: soc/intel/alderlake: Refactor MultiPhaseSiInit API calling method ......................................................................
Patch Set 9:
(1 comment)
File src/drivers/intel/fsp2_0/silicon_init.c:
https://review.coreboot.org/c/coreboot/+/56382/comment/7bc6cf53_ccd4723c PS8, Line 80: #endif
Right, so TGL has an UPD to enable multi-phase Si init, but it's not in the FSPS_ARCH_UPD... Then, if I understand correctly, on TGL the `EnableMultiPhaseSiliconInit` UPD would need to be set from SoC-specific code depending on whether multi-phase Si init is to be enabled.
Hmmm, how about the following:
- Make `enable_multi_phase_init()` non-static, add a declaration in some header and change the definition in this file like so:
#if CONFIG(FSPS_HAS_ARCH_UPD) void enable_multi_phase_init(FSPS_UPD *supd) { FSPS_ARCH_UPD *s_arch_cfg = &supd->FspsArchUpd; s_arch_cfg->EnableMultiPhaseSiliconInit = 1; } #endif
are you suggesting to have some __weak implementation where in FSP driver code, we have #1 as you have mentioned with little change (as below) and TGL SoC only have override (as per #2 code snippet that you have shared) to set the SoC UPD (not the arch UPD)?
src/drivers/intel/fsp2_0/silicon_init.c:
void __weak enable_multi_phase_init(FSPS_UPD *supd) { #if CONFIG(FSPS_HAS_ARCH_UPD) FSPS_ARCH_UPD *s_arch_cfg = &supd->FspsArchUpd; s_arch_cfg->EnableMultiPhaseSiliconInit = 1; #endif }
In that way, we might don't need to guard the function declaration under #if/#endif guard? Please share your thoughts?
https://github.com/coreboot/coreboot/blob/master/src/soc/intel/tigerlake/fsp... (move this code into an override function ?) In TGL code, define this function: void enable_multi_phase_init(FSPS_UPD *supd) { FSP_S_CONFIG *params = &supd->FspsConfig; params->EnableMultiPhaseSiliconInit = 1; }