From a4af1b58a51cd84fbce6de3ce1b13ab4cc994f36 Mon Sep 17 00:00:00 2001 From: MAULIK V VAGHELA Date: Mon, 21 Feb 2022 19:02:19 +0530 Subject: [PATCH] intelblocks/cse: Skip sending EOP during S3 resume coreboot should skip sending EOP during S3 resume since CSE doesn't require EOP in resume path. Currently EOP is being sent during PAYLOAD_BOOT or PAYLOAD_LOAD stage which doesn't get called during S3 resume. In case EOP is moved in earlier stage, coreboot might send EOP in S3 resume as well. This patch adds check before calling cse_send_eop. BUG=b:211085685 BRANCH=None TEST=Check by moving EOP to earlier stage. EOP sending is skipped during S3 resume. Change-Id: I8f22446974bc1e7b2d57468633c36bb99ffe1436 Signed-off-by: MAULIK V VAGHELA Reviewed-on: https://review.coreboot.org/c/coreboot/+/62271 Tested-by: build bot (Jenkins) Reviewed-by: Sridhar Siricilla Reviewed-by: Subrata Banik --- src/soc/intel/common/block/cse/cse_eop.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/soc/intel/common/block/cse/cse_eop.c b/src/soc/intel/common/block/cse/cse_eop.c index 0f1d6cad2c..3a08a7381c 100644 --- a/src/soc/intel/common/block/cse/cse_eop.c +++ b/src/soc/intel/common/block/cse/cse_eop.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include @@ -175,6 +176,11 @@ static void do_send_end_of_post(void) return; } + if (acpi_get_sleep_type() == ACPI_S3) { + printk(BIOS_INFO, "Skip sending EOP during S3 resume\n"); + return; + } + /* * If CSE is already hidden then accessing CSE registers would be wrong and will * receive junk, hence, return as CSE is already disabled. -- 2.11.4.GIT