Attention is currently required from: Julius Werner.
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62720 )
Change subject: cbmem: Fix console banner matches
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/62720
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I99fb347eb1cf7b043a2113dfda7c798d6ee38975
Gerrit-Change-Number: 62720
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Thu, 10 Mar 2022 01:10:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61308 )
Change subject: console: Add loglevel marker codes to stored consoles
......................................................................
Patch Set 12:
(1 comment)
File util/cbmem/cbmem.c:
https://review.coreboot.org/c/coreboot/+/61308/comment/d8d138b5_b4849b15
PS12, Line 798: coreboot
> There will be a BIOS_NOTICE marker before "coreboot".
Oops... thanks for noticing, that needs to be fixed. CB:62720
--
To view, visit https://review.coreboot.org/c/coreboot/+/61308
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I86073f48aaf1e0a58e97676fb80e2475ec418ffc
Gerrit-Change-Number: 61308
Gerrit-PatchSet: 12
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: 9elements QA <hardwaretestrobot(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Comment-Date: Thu, 10 Mar 2022 01:00:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: comment
Attention is currently required from: Yu-Ping Wu.
Hello Yu-Ping Wu,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/62720
to review the following change.
Change subject: cbmem: Fix console banner matches
......................................................................
cbmem: Fix console banner matches
Since the new loglevel markers were added, there will now be a marker
character at the beginning of the coreboot banner string, and this will
make the existing regular expressions meant to find it fail to match.
This patch fixes the problem by just allowing for a single extra
character there (any character to avoid the hassle of having to match
the marker explicitly). The extra character is optional so that we will
still continue to match banners from older versions of coreboot as well.
Since the `?` glyph is not available in basic POSIX regular expressions,
we have to switch to REG_EXTENDED syntax (should otherwise make no
difference). (Also, move side effects out of assert() while I'm here,
that's not actually safe for the standard libc implementation.)
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I99fb347eb1cf7b043a2113dfda7c798d6ee38975
---
M util/cbmem/cbmem.c
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/62720/1
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index a39ef2a..eef68a0 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -818,8 +818,8 @@
cursor = previous = 0;
if (type != CONSOLE_PRINT_FULL) {
#define BANNER_REGEX(stage) \
- "\n\ncoreboot-[^\n]* " stage " starting.*\\.\\.\\.\n"
-#define OVERFLOW_REGEX(stage) "\n\\*\\*\\* Pre-CBMEM " stage " console overflow"
+ "\n\n.?coreboot-[^\n]* " stage " starting.*\\.\\.\\.\n"
+#define OVERFLOW_REGEX(stage) "\n.?\\*\\*\\* Pre-CBMEM " stage " console overflow"
const char *regex[] = { BANNER_REGEX("verstage-before-bootblock"),
BANNER_REGEX("bootblock"),
BANNER_REGEX("verstage"),
@@ -831,7 +831,8 @@
for (size_t i = 0; !cursor && i < ARRAY_SIZE(regex); i++) {
regex_t re;
regmatch_t match;
- assert(!regcomp(&re, regex[i], 0));
+ int res = regcomp(&re, regex[i], REG_EXTENDED);
+ assert(res == 0);
/* Keep looking for matches so we find the last one. */
while (!regexec(&re, console_c + cursor, 1, &match, 0)) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/62720
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I99fb347eb1cf7b043a2113dfda7c798d6ee38975
Gerrit-Change-Number: 62720
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newchange
Attention is currently required from: Selma Bensaid, Patrick Rudolph.
Hello build bot (Jenkins), Cliff Huang, Selma Bensaid, Tim Wawrzynczak, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/62654
to look at the new patch set (#8).
Change subject: soc/intel/alderlake: Add EPP override support
......................................................................
soc/intel/alderlake: Add EPP override support
This updates energy performance preference value to all logical CPUs
when the corresponding chip config is true.
BUG=b:219785001
BRANCH=firmware-brya-14505.B
Signed-off-by: Cliff Huang <cliff.huang(a)intel.corp-partner.google.com>
Change-Id: Ie59623fe715b0c545f8d4b6c22ab2ce670a29798
---
M src/soc/intel/alderlake/chip.h
M src/soc/intel/alderlake/cpu.c
2 files changed, 28 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/62654/8
--
To view, visit https://review.coreboot.org/c/coreboot/+/62654
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie59623fe715b0c545f8d4b6c22ab2ce670a29798
Gerrit-Change-Number: 62654
Gerrit-PatchSet: 8
Gerrit-Owner: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Selma Bensaid <selma.bensaid(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Cliff Huang <cliff.huang(a)intel.corp-partner.google.com>
Gerrit-Attention: Selma Bensaid <selma.bensaid(a)intel.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Bao Zheng, Zheng Bao.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62674 )
Change subject: [TEST]cb_err.h: Add cb_err_t to fix the building error
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Sorry, this was a merge conflict. It should have already been resolved with CB:62676, please update your repository to that. This typedef should not be added back in.
--
To view, visit https://review.coreboot.org/c/coreboot/+/62674
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I94eb73643b16db25faec1dab3f221a70c4e39ac0
Gerrit-Change-Number: 62674
Gerrit-PatchSet: 1
Gerrit-Owner: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Attention: Zheng Bao
Gerrit-Comment-Date: Wed, 09 Mar 2022 23:26:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62653 )
Change subject: cpu/intel/common: Add support for energy performance preference (EPP)
......................................................................
cpu/intel/common: Add support for energy performance preference (EPP)
This provides support to update energy performance preference value.
BUG=b:219785001
BRANCH=firmware-brya-14505.B
Signed-off-by: Cliff Huang <cliff.huang(a)intel.corp-partner.google.com>
Change-Id: I381bca6c7746a4ae7ca32aa1b4992a6d53c8eaaa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62653
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
---
M src/cpu/intel/common/common.h
M src/cpu/intel/common/common_init.c
M src/include/cpu/x86/msr.h
3 files changed, 66 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/cpu/intel/common/common.h b/src/cpu/intel/common/common.h
index ef0a5d9..a29fd2e 100644
--- a/src/cpu/intel/common/common.h
+++ b/src/cpu/intel/common/common.h
@@ -47,4 +47,23 @@
*/
void set_energy_perf_bias(u8 policy);
+/*
+ * Check energy performance preference and HWP capabilities from Thermal and
+ * Power Management Leaf CPUID.
+ */
+bool check_energy_perf_cap(void);
+
+/*
+ * Set the IA32_HWP_REQUEST Energy-Performance Preference bits on the logical
+ * thread. 0 is a hint to the HWP to prefer performance, and 255 is a hint to
+ * prefer energy efficiency.
+ */
+void set_energy_perf_pref(u8 pref);
+
+/*
+ * Instructs the CPU to use EPP hints. This means that any energy policies set
+ * up in `set_energy_perf_bias` will be ignored afterwards.
+ */
+void enable_energy_perf_pref(void);
+
#endif
diff --git a/src/cpu/intel/common/common_init.c b/src/cpu/intel/common/common_init.c
index 24e3eeb..4d6df84 100644
--- a/src/cpu/intel/common/common_init.c
+++ b/src/cpu/intel/common/common_init.c
@@ -5,9 +5,12 @@
#include <console/console.h>
#include <cpu/intel/msr.h>
#include <cpu/x86/msr.h>
+#include <cpu/intel/turbo.h>
#include "common.h"
-#define CPUID_6_ECX_EPB (1 << 3)
+#define CPUID_6_ECX_EPB (1 << 3)
+#define CPUID_6_ENGERY_PERF_PREF (1 << 10)
+#define CPUID_6_HWP (1 << 7)
void set_vmx_and_lock(void)
{
@@ -182,3 +185,43 @@
msr_unset_and_set(IA32_ENERGY_PERF_BIAS, ENERGY_POLICY_MASK, epb);
printk(BIOS_DEBUG, "cpu: energy policy set to %u\n", epb);
}
+
+/*
+ * Check energy performance preference and HWP capabilities from Thermal and
+ * Power Management Leaf CPUID
+ */
+bool check_energy_perf_cap(void)
+{
+ const u32 cap = cpuid_eax(CPUID_LEAF_PM);
+ if (!(cap & CPUID_6_ENGERY_PERF_PREF))
+ return false;
+ if (!(cap & CPUID_6_HWP))
+ return false;
+ return true;
+}
+
+/*
+ * Instructs the CPU to use EPP hints. This means that any energy policies set
+ * up in `set_energy_perf_bias` will be ignored afterwards.
+ */
+void enable_energy_perf_pref(void)
+{
+ msr_t msr = rdmsr(IA32_PM_ENABLE);
+ if (!(msr.lo & HWP_ENABLE)) {
+ /* Package-scoped MSR */
+ printk(BIOS_DEBUG, "HWP_ENABLE: energy-perf preference in favor of energy-perf bias\n");
+ msr_set(IA32_PM_ENABLE, HWP_ENABLE);
+ }
+}
+
+/*
+ * Set the IA32_HWP_REQUEST Energy-Performance Preference bits on the logical
+ * thread. 0 is a hint to the HWP to prefer performance, and 255 is a hint to
+ * prefer energy efficiency.
+ * This function needs to be called when HWP_ENABLE is set.
+*/
+void set_energy_perf_pref(u8 pref)
+{
+ msr_unset_and_set(IA32_HWP_REQUEST, IA32_HWP_REQUEST_EPP_MASK,
+ pref << IA32_HWP_REQUEST_EPP_SHIFT);
+}
diff --git a/src/include/cpu/x86/msr.h b/src/include/cpu/x86/msr.h
index 4d1cb68..9f30c05 100644
--- a/src/include/cpu/x86/msr.h
+++ b/src/include/cpu/x86/msr.h
@@ -86,8 +86,11 @@
#define IA32_VMX_MISC_MSR 0x485
#define IA32_PM_ENABLE 0x770
+#define HWP_ENABLE 0x1
#define IA32_HWP_CAPABILITIES 0x771
#define IA32_HWP_REQUEST 0x774
+#define IA32_HWP_REQUEST_EPP_MASK 0xff000000
+#define IA32_HWP_REQUEST_EPP_SHIFT 24
#define IA32_HWP_STATUS 0x777
#define IA32_L3_PROTECTED_WAYS 0xc85
#define IA32_SF_QOS_INFO 0xc87
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://review.coreboot.org/c/coreboot/+/62653
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I381bca6c7746a4ae7ca32aa1b4992a6d53c8eaaa
Gerrit-Change-Number: 62653
Gerrit-PatchSet: 5
Gerrit-Owner: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Selma Bensaid <selma.bensaid(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Cliff Huang <cliff.huang(a)intel.corp-partner.google.com>
Gerrit-MessageType: merged
Attention is currently required from: Sridhar Siricilla, Patrick Rudolph.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62560 )
Change subject: soc/intel/common: Retry MEI CSE DISABLE command
......................................................................
Patch Set 5: Code-Review+1
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/62560/comment/5954c082_087a928c
PS5, Line 12:
same here, mention it's from the BWG?
--
To view, visit https://review.coreboot.org/c/coreboot/+/62560
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id38a172d670a0cd44643744f27b85ca7e368ccdb
Gerrit-Change-Number: 62560
Gerrit-PatchSet: 5
Gerrit-Owner: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Sridhar Siricilla <sridhar.nest(a)gmail.com>
Gerrit-Attention: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Wed, 09 Mar 2022 22:47:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Anil Kumar K, Sridhar Siricilla, Patrick Rudolph.
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62192 )
Change subject: soc/intel/common: Retry END_OF_POST command
......................................................................
Patch Set 11: Code-Review+1
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/62192/comment/1440376c_e85b4f59
PS11, Line 12:
nit: can you mention that this is from the BWG?
--
To view, visit https://review.coreboot.org/c/coreboot/+/62192
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ieaec4d5564e3d962c1cc866351e9e7eaa8e58683
Gerrit-Change-Number: 62192
Gerrit-PatchSet: 11
Gerrit-Owner: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Reviewer: Anil Kumar K <anil.kumar.k(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Sridhar Siricilla <sridhar.nest(a)gmail.com>
Gerrit-Attention: Anil Kumar K <anil.kumar.k(a)intel.com>
Gerrit-Attention: Sridhar Siricilla <sridhar.siricilla(a)intel.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Wed, 09 Mar 2022 22:46:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment