From 88ade91073ac7e6f550ad9e3f5239cc76cb6d202 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Fri, 14 Apr 2023 12:25:28 +0100 Subject: soc/intel/common: Fix long delay when ME is disabled If the ME is disabled with the `me_state` CMOS setting, boot times are approximately 5 seconds longer: 942:before sending EOP to ME 1,240,773 (5,599) 943:after sending EOP to ME 6,263,951 (5,023,177) Total Time: 6,167,443 This is because the current code only checks if the ME is disabled for CSE LITE SKUs. With this patch, boot times are approximately 5 seconds quicker: Total Time: 1,143,932 Tested on `starbook/adl` and `starbook/tgl`. Signed-off-by: Sean Rhodes Change-Id: I182f30d4fbf43955747c6a7a0b284a43f9c5e4ef Reviewed-on: https://review.coreboot.org/c/coreboot/+/74435 Tested-by: build bot (Jenkins) Reviewed-by: Sridhar Siricilla Reviewed-by: Lean Sheng Tan --- src/soc/intel/common/block/cse/cse_eop.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/block/cse/cse_eop.c b/src/soc/intel/common/block/cse/cse_eop.c index dd67e595bb..135bcb7be2 100644 --- a/src/soc/intel/common/block/cse/cse_eop.c +++ b/src/soc/intel/common/block/cse/cse_eop.c @@ -269,21 +269,33 @@ static void do_send_end_of_post(bool wait_for_completion) /* * Don't send EOP if the following conditions are met: + * CSE Lite: * 1. "The platform is running CSE-Lite SKU" AND * 2. 'The CSE is running the RO FW" AND * 3. "The board is in recovery mode" * + * Other CSE Type: + * 1. "The board is in recovery mode" + * * The above conditions summarize that the CSE is in "SOFT TEMP DISABLE" state, * hence, don't send the EOP command to CSE. */ static bool is_cse_eop_supported(void) { - if (CONFIG(SOC_INTEL_CSE_LITE_SKU) && vboot_recovery_mode_enabled() && + /* CSE Lite */ + if ((CONFIG(SOC_INTEL_CSE_LITE_SKU) && vboot_recovery_mode_enabled()) && cse_is_hfs1_com_soft_temp_disable()) { - printk(BIOS_INFO, "HECI: coreboot in recovery mode; found CSE in expected SOFT " - "TEMP DISABLE state, skipping EOP\n"); + printk(BIOS_INFO, "HECI: coreboot in recovery mode; found CSE Lite in expected " + "SOFT TEMP DISABLE state, skipping EOP\n"); return false; } + /* Other CSE Type */ + if (cse_is_hfs1_com_soft_temp_disable()) { + printk(BIOS_INFO, "HECI: coreboot in recovery mode; found CSE in expected " + "SOFT TEMP DISABLE state, skipping EOP\n"); + return false; + } + return true; } -- cgit v1.2.3