soc/intel/meteorlake: Avoid redundant chipset programming in romstage

This patch refactors the mainboard_romstage_entry() function to avoid
redundant chipset programming caused by global reset due to CSE FW
sync operation. Hence, keeping only the minimal and mandatory
operations required to perform CSE FW sync successfully.

This would help to optimize the boot flow by removing redundant
programming like SA, SMBUS twice in every CSE FW update path.

TEST=Able to build and boot Google/Rex successfully.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I1a13fac1e99341991d8dd818d4ab8a20d209a94c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71933
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2023-01-16 13:52:40 +05:30 committed by Felix Held
parent 55812d6430
commit d4cc902c57
1 changed files with 6 additions and 6 deletions

View File

@ -119,23 +119,23 @@ static void save_dimm_info(void)
void mainboard_romstage_entry(void) void mainboard_romstage_entry(void)
{ {
bool s3wake;
struct chipset_power_state *ps = pmc_get_power_state(); struct chipset_power_state *ps = pmc_get_power_state();
bool s3wake = pmc_fill_power_state(ps) == ACPI_S3;
/* Program MCHBAR, DMIBAR, GDXBAR and EDRAMBAR */
systemagent_early_init();
/* Program SMBus base address and enable it */
smbus_common_init();
/* Initialize HECI interface */ /* Initialize HECI interface */
cse_init(HECI1_BASE_ADDRESS); cse_init(HECI1_BASE_ADDRESS);
s3wake = pmc_fill_power_state(ps) == ACPI_S3;
if (!s3wake && CONFIG(SOC_INTEL_CSE_LITE_SKU)) { if (!s3wake && CONFIG(SOC_INTEL_CSE_LITE_SKU)) {
timestamp_add_now(TS_CSE_FW_SYNC_START); timestamp_add_now(TS_CSE_FW_SYNC_START);
cse_fw_sync(); cse_fw_sync();
timestamp_add_now(TS_CSE_FW_SYNC_END); timestamp_add_now(TS_CSE_FW_SYNC_END);
} }
/* Program MCHBAR, DMIBAR, GDXBAR and EDRAMBAR */
systemagent_early_init();
/* Program SMBus base address and enable it */
smbus_common_init();
/* /*
* Set low maximum temp threshold value used for dynamic thermal sensor * Set low maximum temp threshold value used for dynamic thermal sensor
* shutdown consideration. * shutdown consideration.