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 <subratabanik@google.com>
Change-Id: If4c4564befcd38732368b21f1ca3e24b68c30e0c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69978
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
This commit is contained in:
Subrata Banik 2022-11-24 23:45:44 +05:30
parent 17a3da8b99
commit adbef6d2b3
1 changed files with 6 additions and 4 deletions

View File

@ -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