Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69977 )
Change subject: soc/intel/cmn/cse: Create API to perform essential post EOP operations
......................................................................
soc/intel/cmn/cse: Create API to perform essential post EOP operations
This patch creates an API that can perform essential CSE operation
after sending the EOP command to the CSE and before booting to OS.
Lists of operation are
- Perform global reset lock
- Put HECI1 to D0i3 and disable the HECI1 if the user selects
- Set D0I3 for all HECI devices.
Additionally, ensures that CSE .final operation is not sending EOP
and other essential operations if the SoC user selects
SOC_INTEL_CSE_SEND_EOP_LATE config.
BUG=none
TEST=Able to boot Google/Rex after sending CSE EOP late.
Signed-off-by: Subrata Banik <subratabanik(a)google.com>
Change-Id: I10131ea9b553a62f0d632783c4dbad96d35d6563
---
M src/soc/intel/common/block/cse/cse.c
M src/soc/intel/common/block/include/intelblocks/cse.h
2 files changed, 54 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/69977/1
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c
index fdeb01e..6434371 100644
--- a/src/soc/intel/common/block/cse/cse.c
+++ b/src/soc/intel/common/block/cse/cse.c
@@ -1256,11 +1256,34 @@
}
/*
+ * This function to perform essential post EOP cse related operations
+ * upon SoC selecting `SOC_INTEL_CSE_SEND_EOP_LATE` config
+ */
+void cse_late_finalize(void)
+{
+ if (!CONFIG(SOC_INTEL_CSE_SEND_EOP_LATE))
+ return;
+
+ if (!CONFIG(USE_FSP_NOTIFY_PHASE_READY_TO_BOOT))
+ cse_final_ready_to_boot();
+
+ if (!CONFIG(USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE))
+ cse_final_end_of_firmware();
+}
+
+/*
* `cse_final` function is native implementation of equivalent events performed by
* each FSP NotifyPhase() API invocations.
*/
static void cse_final(struct device *dev)
{
+ /*
+ * SoC user decided to send EOP late hence, the `cse_late_finalize()` will
+ * take care of essential post EOP cse related operations.
+ */
+ if (CONFIG(SOC_INTEL_CSE_SEND_EOP_LATE))
+ return;
+
/* 1. Send EOP to CSE if not done.*/
if (CONFIG(SOC_INTEL_CSE_SET_EOP))
cse_send_end_of_post();
diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h
index f7aae1c..564ff48 100644
--- a/src/soc/intel/common/block/include/intelblocks/cse.h
+++ b/src/soc/intel/common/block/include/intelblocks/cse.h
@@ -542,6 +542,12 @@
void cse_send_end_of_post(void);
/*
+ * This function to perform essential post EOP cse related operations
+ * upon SoC selecting `SOC_INTEL_CSE_SEND_EOP_LATE` config
+ */
+void cse_late_finalize(void);
+
+/*
* SoC override API to make heci1 disable using PCR.
*
* Allow SoC to implement heci1 disable override due to PSF registers being
--
To view, visit https://review.coreboot.org/c/coreboot/+/69977
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I10131ea9b553a62f0d632783c4dbad96d35d6563
Gerrit-Change-Number: 69977
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: newchange
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69976 )
Change subject: soc/intel/cmn/cse: Create another config for sending CSE EOP cmd late
......................................................................
soc/intel/cmn/cse: Create another config for sending CSE EOP cmd late
Presently, coreboot supports two instances of sending EOP cmd to
the Intel CSE.
1. Sending EOP cmd to CSE during `.final` operation from cse pci driver.
2. Starting with Alder Lake, the recommendation was to send EOP to CSE
earlier than CSE `.final` operation. Since then it's referred to as
`Sending EOP Early`. This method helped to save the CSE EOP response
time significantly.
During Meteor Lake platform, CSE EOP response time has become
non-deterministic and we have figured that sending EOP command later
than CSE .final operation is actually helping to optimize the boot time
significantly (around ~150ms savings compared to sending from `.final`
ops and ~5sec compared to sending CSE early).
Hence, this patch intended to create yet another kconfig for sending
CSE late (specifically after `.final` operation). The idea for this
newer config is to use the boot state machine for sending CSE EOP cmd.
The patch train in this series would add the specific changes to allow
sending EOP late and perform other essential operations required prior
booting to OS as coreboot decided to skip calling into FSP Notify phase.
The current plan is that Intel Meteor Lake platform will select this
newer config from SoC code.
BUG=none
TEST=Able to send EOP command successfully for Google/Taeko.
Signed-off-by: Subrata Banik <subratabanik(a)google.com>
Change-Id: Iea512cd5b79d61dd5d5a962079baf525027c831f
---
M src/soc/intel/common/block/cse/Kconfig
1 file changed, 50 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/69976/1
diff --git a/src/soc/intel/common/block/cse/Kconfig b/src/soc/intel/common/block/cse/Kconfig
index 55a2b49..cdc4db4 100644
--- a/src/soc/intel/common/block/cse/Kconfig
+++ b/src/soc/intel/common/block/cse/Kconfig
@@ -54,6 +54,17 @@
In later stages, CSE might be busy and might require more time to process EOP command.
SoC can use this Kconfig to send EOP earlier by itself.
+config SOC_INTEL_CSE_SEND_EOP_LATE
+ bool
+ depends on SOC_INTEL_COMMON_BLOCK_CSE
+ help
+ Use this config to send End Of Post (EOP) late (even after CSE `final` operation)
+ using boot state either `BS_PAYLOAD_BOOT` or `BS_PAYLOAD_LOAD` from common code
+ in order to reduce time required to send EOP and getting CSE response.
+ It has been observed that CSE might be busy and might require more time to
+ process the EOP command.
+ SoC can use this Kconfig to send EOP later by itself.
+
config SOC_INTEL_CSE_LITE_SKU
bool
default n
--
To view, visit https://review.coreboot.org/c/coreboot/+/69976
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iea512cd5b79d61dd5d5a962079baf525027c831f
Gerrit-Change-Number: 69976
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: newchange
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69975 )
Change subject: soc/intel/cmn/cse: Send EOP cmd from .final aka `cse_final()`
......................................................................
soc/intel/cmn/cse: Send EOP cmd from .final aka `cse_final()`
This patch refactors common code to allow cse_final() function to send
EOP cmd if the SoC user selects `SOC_INTEL_CSE_SET_EOP` kconfig.
This patch helps cse_final_ready_to_boot() and
cse_final_end_of_firmware() function for being meaningful with its
operation and let cse_final() being that outer layer to perform three
operations based on the selected kconfig.
1. send cse eop command
2. perform cse_final_end_of_firmware() operations
3. perform cse_final_end_of_firmware() operations
BUG=none
TEST=Able to send EOP command successfully for Google/Taeko.
Signed-off-by: Subrata Banik <subratabanik(a)google.com>
Change-Id: I412291c9378011509d3825f9b01e81bfced53303
---
M src/soc/intel/common/block/cse/cse.c
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/69975/1
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c
index c2d4484..fdeb01e 100644
--- a/src/soc/intel/common/block/cse/cse.c
+++ b/src/soc/intel/common/block/cse/cse.c
@@ -1228,17 +1228,13 @@
* performed by FSP NotifyPhase(Ready To Boot) API invocations.
*
* Operations are:
- * 1. Send EOP to CSE if not done.
- * 2. Perform global reset lock.
- * 3. Put HECI1 to D0i3 and disable the HECI1 if the user selects
+ * 1. Perform global reset lock.
+ * 2. Put HECI1 to D0i3 and disable the HECI1 if the user selects
* DISABLE_HECI1_AT_PRE_BOOT config or CSE HFSTS1 Operation Mode is
* `Software Temporary Disable`.
*/
static void cse_final_ready_to_boot(void)
{
- if (CONFIG(SOC_INTEL_CSE_SET_EOP))
- cse_send_end_of_post();
-
cse_control_global_reset_lock();
if (CONFIG(DISABLE_HECI1_AT_PRE_BOOT) || cse_is_hfs1_com_soft_temp_disable()) {
@@ -1265,6 +1261,10 @@
*/
static void cse_final(struct device *dev)
{
+ /* 1. Send EOP to CSE if not done.*/
+ if (CONFIG(SOC_INTEL_CSE_SET_EOP))
+ cse_send_end_of_post();
+
if (!CONFIG(USE_FSP_NOTIFY_PHASE_READY_TO_BOOT))
cse_final_ready_to_boot();
--
To view, visit https://review.coreboot.org/c/coreboot/+/69975
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I412291c9378011509d3825f9b01e81bfced53303
Gerrit-Change-Number: 69975
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-MessageType: newchange
Attention is currently required from: Felix Held.
Hello Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/69981
to look at the new patch set (#2).
Change subject: [NEEDS TEST] util/superiotool: Replace iopl with ioperm
......................................................................
[NEEDS TEST] util/superiotool: Replace iopl with ioperm
The iopl system call is marked as deprecated, and on some distributions
the call no longer seems to be implemented. Replace it with ioperm.
Resolves: https://ticket.coreboot.org/issues/440
TEST: Run superiotool sucessfully on Ubuntu 22.10, which does not seem
to have iopl implemented
Change-Id: I6671023b09d22ff38e578d11d04674fb6ae763c9
Signed-off-by: Nicholas Chin <nic.c3.14(a)gmail.com>
---
M util/superiotool/superiotool.c
1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/69981/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/69981
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6671023b09d22ff38e578d11d04674fb6ae763c9
Gerrit-Change-Number: 69981
Gerrit-PatchSet: 2
Gerrit-Owner: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newpatchset
Nicholas Chin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69981 )
Change subject: [NEEDS TEST] util/superiotool: Replace iopl with ioperm
......................................................................
[NEEDS TEST] util/superiotool: Replace iopl with ioperm
The iopl system call is marked as deprecated, and on some distributions
the call no longer seems to be implemented. Replace it with ioperm.
Resolves: https://ticket.coreboot.org/issues/440
Change-Id: I6671023b09d22ff38e578d11d04674fb6ae763c9
Signed-off-by: Nicholas Chin <nic.c3.14(a)gmail.com>
---
M util/superiotool/superiotool.c
1 file changed, 16 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/69981/1
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c
index ed18c13..f7b96f6 100644
--- a/util/superiotool/superiotool.c
+++ b/util/superiotool/superiotool.c
@@ -324,7 +324,7 @@
if ((io_fd = open("/dev/io", O_RDWR)) < 0) {
perror("/dev/io");
#else
- if (iopl(3) < 0) {
+ if (ioperm(0, 65536, 1) < 0) {
perror("iopl");
#endif
printf("Superiotool must be run as root.\n");
--
To view, visit https://review.coreboot.org/c/coreboot/+/69981
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6671023b09d22ff38e578d11d04674fb6ae763c9
Gerrit-Change-Number: 69981
Gerrit-PatchSet: 1
Gerrit-Owner: Nicholas Chin <nic.c3.14(a)gmail.com>
Gerrit-MessageType: newchange
Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/69918 )
Change subject: util/lint: Ignore fmd files when evaluating Kconfig symbols
......................................................................
util/lint: Ignore fmd files when evaluating Kconfig symbols
Signed-off-by: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Change-Id: I5e3ff8ee10fdd3514033e72bd0c2664a4b2f5310
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69918
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-by: Elyes Haouas <ehaouas(a)noos.fr>
---
M util/lint/kconfig_lint
1 file changed, 15 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Elyes Haouas: Looks good to me, approved
Arthur Heymans: Looks good to me, approved
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index f2a732d..9c9a8a9 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -34,7 +34,7 @@
my $exclude_dirs_and_files =
'^build/\|^coreboot-builds/\|^configs/\|^util/\|^\.git/\|^payloads\|^Documentation\|^3rdparty'
. '\|' . # directories to exclude when searching for used symbols
- '\.config\|\.txt$\|\.tex$\|\.tags\|/kconfig.h'; #files to exclude when looking for symbols
+ '\.config\|\.txt$\|\.tex$\|\.tags\|/kconfig.h\|\.fmd'; #files to exclude when looking for symbols
my $payload_files_to_check='payloads/Makefile.inc payloads/external/Makefile.inc';
my $config_file = ""; # name of config file to load symbol values from.
my @wholeconfig; # document the entire kconfig structure
--
To view, visit https://review.coreboot.org/c/coreboot/+/69918
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5e3ff8ee10fdd3514033e72bd0c2664a4b2f5310
Gerrit-Change-Number: 69918
Gerrit-PatchSet: 2
Gerrit-Owner: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged