Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84935?usp=email )
Change subject: soc/intel/alderlake: Do lazy reset after disabling UFS ......................................................................
soc/intel/alderlake: Do lazy reset after disabling UFS
If the mainboard expects upcoming reset, then skip the reset after disabling UFS. This will reduce the number of resets during firmware update.
BUG=b:375444631 TEST=Build Brox BIOS image and boot to OS. Perform a firmware update and confirm that the number of reset is reduced.
Change-Id: I4399555302ec23a76f89f406f437f311eea0ef99 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/soc/intel/alderlake/include/soc/romstage.h M src/soc/intel/alderlake/romstage/romstage.c 2 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/84935/1
diff --git a/src/soc/intel/alderlake/include/soc/romstage.h b/src/soc/intel/alderlake/include/soc/romstage.h index 679d538..49c3032 100644 --- a/src/soc/intel/alderlake/include/soc/romstage.h +++ b/src/soc/intel/alderlake/include/soc/romstage.h @@ -20,4 +20,5 @@ BOARD_TYPE_SERVER = 8 };
+bool mainboard_expects_another_reset(void); #endif /* _SOC_ROMSTAGE_H_ */ diff --git a/src/soc/intel/alderlake/romstage/romstage.c b/src/soc/intel/alderlake/romstage/romstage.c index ff600db..2f50cd2 100644 --- a/src/soc/intel/alderlake/romstage/romstage.c +++ b/src/soc/intel/alderlake/romstage/romstage.c @@ -32,6 +32,11 @@ #define PCR_PSFX_T0_SHDW_PCIEN 0x1C #define PCR_PSFX_T0_SHDW_PCIEN_FUNDIS (1 << 8)
+bool __weak mainboard_expects_another_reset(void) +{ + return false; +} + static void disable_ufs(void) { /* disable USF0 */ @@ -185,7 +190,7 @@ (CONFIG(USE_UNIFIED_AP_FIRMWARE_FOR_UFS_AND_NON_UFS))) { printk(BIOS_INFO, "Disabling UFS controllers\n"); disable_ufs(); - if (ps->prev_sleep_state == ACPI_S5) { + if (ps->prev_sleep_state == ACPI_S5 && !mainboard_expects_another_reset()) { printk(BIOS_INFO, "Warm Reset after disabling UFS controllers\n"); system_reset(); }