diff options
author | Subrata Banik <subratabanik@google.com> | 2022-11-24 19:42:55 +0530 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2022-11-26 08:42:21 +0000 |
commit | fb970a43bd69e36e4fc8a98883d0525f6b071eb5 (patch) | |
tree | bc6b44855f2cd51d3a5ff9fabfc56ceba838da6c | |
parent | a3c0ba12eb0f5f89133789db0d19f5dff0ed0a7f (diff) |
soc/intel/meteorlake: Refactor heci finalize functions
This patch creates a helper function `heci_finalize()` to keep HECI
related operations separated for easy guarding again FSP config.
Currently, `heci_set_to_d0i3()` function is getting called twice.
BUG=b:260041679
TEST=Able to build google/rex with this patch and observe coreboot log
modification as below:
Without this patch:
[DEBUG] BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 14 ms
[WARN ] HECI: CSE device 16.1 is disabled
[WARN ] HECI: CSE device 16.2 is disabled
[WARN ] HECI: CSE device 16.3 is disabled
[WARN ] HECI: CSE device 16.4 is disabled
[WARN ] HECI: CSE device 16.5 is disabled
[DEBUG] Finalizing chipset.
[DEBUG] apm_control: Finalizing SMM.
[DEBUG] APMC done.
[WARN ] HECI: CSE device 16.1 is disabled
[WARN ] HECI: CSE device 16.2 is disabled
[WARN ] HECI: CSE device 16.3 is disabled
[WARN ] HECI: CSE device 16.4 is disabled
[WARN ] HECI: CSE device 16.5 is disabled
[DEBUG] BS: BS_PAYLOAD_BOOT entry times (exec / console): 29 / 78 ms
With this patch:
[DEBUG] BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 14 ms
[WARN ] HECI: CSE device 16.1 is disabled
[WARN ] HECI: CSE device 16.2 is disabled
[WARN ] HECI: CSE device 16.3 is disabled
[WARN ] HECI: CSE device 16.4 is disabled
[WARN ] HECI: CSE device 16.5 is disabled
[DEBUG] Finalizing chipset.
[DEBUG] apm_control: Finalizing SMM.
[DEBUG] APMC done.
[DEBUG] BS: BS_PAYLOAD_BOOT entry times (exec / console): 28 / 52 ms
Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I7021a1d4c73d3fdfddfd6e809ebc1eeb1fa6d75e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69974
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
-rw-r--r-- | src/soc/intel/meteorlake/finalize.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/soc/intel/meteorlake/finalize.c b/src/soc/intel/meteorlake/finalize.c index d3ae16a5fc..f30a6acd23 100644 --- a/src/soc/intel/meteorlake/finalize.c +++ b/src/soc/intel/meteorlake/finalize.c @@ -64,6 +64,13 @@ static void sa_finalize(void) sa_lock_pam(); } +static void heci_finalize(void) +{ + heci_set_to_d0i3(); + if (CONFIG(DISABLE_HECI1_AT_PRE_BOOT)) + heci1_disable(); +} + static void soc_finalize(void *unused) { printk(BIOS_DEBUG, "Finalizing chipset.\n"); @@ -72,9 +79,9 @@ static void soc_finalize(void *unused) apm_control(APM_CNT_FINALIZE); tbt_finalize(); sa_finalize(); - heci_set_to_d0i3(); - if (CONFIG(DISABLE_HECI1_AT_PRE_BOOT)) - heci1_disable(); + if (CONFIG(USE_FSP_NOTIFY_PHASE_READY_TO_BOOT) && + CONFIG(USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE)) + heci_finalize(); /* Indicate finalize step with post code */ post_code(POST_OS_BOOT); |