From adbef6d2b3d46b3deaca49e93eb6e1b905c0ae61 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 24 Nov 2022 23:45:44 +0530 Subject: [PATCH] soc/intel/cmn/cse: Allow to perform essential CSE operations post EOP This patch allows to send late EOP cmd to CSE (after CSE .final) using boot state machine (either BS_PAYLOAD_BOOT or BS_PAYLOAD_LOAD) if the SoC user selects SOC_INTEL_CSE_SEND_EOP_LATE config. Rename `set_cse_end_of_post()` to `send_cse_eop_with_late_finalize()` to make the function name more meaningful with its operation. BUG=b:260041679 TEST=Able to boot Google/Rex after sending CSE EOP late. Signed-off-by: Subrata Banik Change-Id: If4c4564befcd38732368b21f1ca3e24b68c30e0c Reviewed-on: https://review.coreboot.org/c/coreboot/+/69978 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal Reviewed-by: Lean Sheng Tan --- src/soc/intel/common/block/cse/cse_eop.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/soc/intel/common/block/cse/cse_eop.c b/src/soc/intel/common/block/cse/cse_eop.c index b8b8e36486..53a4fa555e 100644 --- a/src/soc/intel/common/block/cse/cse_eop.c +++ b/src/soc/intel/common/block/cse/cse_eop.c @@ -238,9 +238,11 @@ void cse_send_end_of_post(void) return do_send_end_of_post(); } -static void set_cse_end_of_post(void *unused) +static void send_cse_eop_with_late_finalize(void *unused) { - return do_send_end_of_post(); + do_send_end_of_post(); + if (CONFIG(SOC_INTEL_CSE_SEND_EOP_LATE)) + cse_late_finalize(); } /* @@ -253,7 +255,7 @@ static void set_cse_end_of_post(void *unused) * BS_PAYLOAD_BOOT instead. */ #if !CONFIG(HECI_DISABLE_USING_SMM) -BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, set_cse_end_of_post, NULL); +BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, send_cse_eop_with_late_finalize, NULL); #else -BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_ENTRY, set_cse_end_of_post, NULL); +BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_ENTRY, send_cse_eop_with_late_finalize, NULL); #endif