Attention is currently required from: Raul Rangel.
Hello build bot (Jenkins), Furquan Shaikh, Julius Werner, Karthik Ramasubramanian,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/56318
to look at the new patch set (#2).
Change subject: lib/thread: Verify threads are initialized before yielding
......................................................................
lib/thread: Verify threads are initialized before yielding
In hardwaremain.c we call console_init before threads_initialize. Part
of setting up the uart requires calling udelay which then calls
thread_yield_microseconds. Since threads have not been set up, trying to
yield will result in bad things happening. This change guards the thread
methods by making current_thread return NULL if the structures have not
been initialized.
BUG=b:179699789
TEST=Ramstage no longer hangs with serial enabled
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: If9e1eedfaebe584901d2937c8aa24e158706fa43
---
M src/lib/thread.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/56318/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/56318
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If9e1eedfaebe584901d2937c8aa24e158706fa43
Gerrit-Change-Number: 56318
Gerrit-PatchSet: 2
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Krystian Hebel <krystian.hebel(a)3mdeb.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-MessageType: newpatchset
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56312 )
Change subject: soc/amd/common/block/cpu/mca/mca: factor out mca_skip_check
......................................................................
soc/amd/common/block/cpu/mca/mca: factor out mca_skip_check
This will allow moving mca_check_all_banks to mca_common.c.
Change-Id: I58e100c1447907bab984a2fdff6c6e0181910c23
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56312
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Martin Roth <martinroth(a)google.com>
---
M src/soc/amd/common/block/cpu/mca/mca.c
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Martin Roth: Looks good to me, approved
diff --git a/src/soc/amd/common/block/cpu/mca/mca.c b/src/soc/amd/common/block/cpu/mca/mca.c
index b5fd6a2..1c3a30c 100644
--- a/src/soc/amd/common/block/cpu/mca/mca.c
+++ b/src/soc/amd/common/block/cpu/mca/mca.c
@@ -9,6 +9,11 @@
#include <types.h>
#include "mca_common_defs.h"
+static bool mca_skip_check(void)
+{
+ return !is_warm_reset();
+}
+
static void mca_print_error(unsigned int bank)
{
msr_t msr;
@@ -36,7 +41,7 @@
if (!mca_has_expected_bank_count())
printk(BIOS_WARNING, "CPU has an unexpected number of MCA banks!\n");
- if (!is_warm_reset())
+ if (mca_skip_check())
return;
for (unsigned int i = 0 ; i < num_banks ; i++) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/56312
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I58e100c1447907bab984a2fdff6c6e0181910c23
Gerrit-Change-Number: 56312
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Ian Feng, Dtrain Hsu, Henry Sun, Paul Menzel, Shou-Chieh Hsu.
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56248 )
Change subject: mb/google/dedede/var/cret: Enable/disable Touchscreen based on FW_CONFIG
......................................................................
Patch Set 4:
(1 comment)
File src/mainboard/google/dedede/variants/baseboard/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/56248/comment/67b4a120_8723f087
PS4, Line 13: field TOUCHSCREEN 5
: option TOUCHSCREEN_ABSENT 0
: option TOUCHSCREEN_PRESENT 1
: end
Does this FW config field apply to the entire Dedede design or does it apply only to Cret?
--
To view, visit https://review.coreboot.org/c/coreboot/+/56248
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ice517c034e2dab93bb27e75dccf06d9a0936526b
Gerrit-Change-Number: 56248
Gerrit-PatchSet: 4
Gerrit-Owner: Dtrain Hsu <dtrain_hsu(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Henry Sun <henrysun(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Shou-Chieh Hsu <shouchieh(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alan Lee <alan_lee(a)compal.corp-partner.google.com>
Gerrit-CC: Frank Wu <frank_wu(a)compal.corp-partner.google.com>
Gerrit-CC: Ian Feng <ian_feng(a)compal.corp-partner.google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Ian Feng <ian_feng(a)compal.corp-partner.google.com>
Gerrit-Attention: Dtrain Hsu <dtrain_hsu(a)compal.corp-partner.google.com>
Gerrit-Attention: Henry Sun <henrysun(a)google.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Shou-Chieh Hsu <shouchieh(a)google.com>
Gerrit-Comment-Date: Thu, 15 Jul 2021 17:04:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56311 )
Change subject: soc/amd/stoneyridge/mca: implement and use mca_has_expected_bank_count
......................................................................
soc/amd/stoneyridge/mca: implement and use mca_has_expected_bank_count
This aligns the mca_check_all_banks implementation in the common mca.c
with the one in the common mcax.c file. Do the MCA bank count check
before the !is_warm_reset() check, so that a mismatch also gets printed
on the cold boot path.
Change-Id: Idbd3e9ce9c7483f84f87adab7adac47335cd59aa
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56311
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Martin Roth <martinroth(a)google.com>
---
M src/soc/amd/common/block/cpu/mca/mca.c
M src/soc/amd/stoneyridge/mca.c
2 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Martin Roth: Looks good to me, approved
diff --git a/src/soc/amd/common/block/cpu/mca/mca.c b/src/soc/amd/common/block/cpu/mca/mca.c
index 2d91894..b5fd6a2 100644
--- a/src/soc/amd/common/block/cpu/mca/mca.c
+++ b/src/soc/amd/common/block/cpu/mca/mca.c
@@ -33,6 +33,9 @@
struct mca_bank_status mci;
const unsigned int num_banks = mca_get_bank_count();
+ if (!mca_has_expected_bank_count())
+ printk(BIOS_WARNING, "CPU has an unexpected number of MCA banks!\n");
+
if (!is_warm_reset())
return;
diff --git a/src/soc/amd/stoneyridge/mca.c b/src/soc/amd/stoneyridge/mca.c
index 240e75d..7ca16a8 100644
--- a/src/soc/amd/stoneyridge/mca.c
+++ b/src/soc/amd/stoneyridge/mca.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <amdblocks/mca.h>
+#include <cpu/x86/msr.h>
#include <types.h>
static const char *const mca_bank_name[] = {
@@ -15,6 +16,11 @@
[6] = "Floating point unit"
};
+bool mca_has_expected_bank_count(void)
+{
+ return ARRAY_SIZE(mca_bank_name) == mca_get_bank_count();
+}
+
bool mca_is_valid_bank(unsigned int bank)
{
return (bank < ARRAY_SIZE(mca_bank_name) && mca_bank_name[bank] != NULL);
--
To view, visit https://review.coreboot.org/c/coreboot/+/56311
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idbd3e9ce9c7483f84f87adab7adac47335cd59aa
Gerrit-Change-Number: 56311
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56294 )
Change subject: soc/amd/picasso/mca: factor out mca_has_expected_bank_count
......................................................................
soc/amd/picasso/mca: factor out mca_has_expected_bank_count
To factor out the rest of the common MCAX code, mca_bank_name[] may only
be accessed by accessor functions, so implement this for the last place
that still accessed mca_bank_name[] directly.
Change-Id: Ic6548d3ceeb9c00ad344fc0bb3d97893e17a43a9
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56294
Reviewed-by: Martin Roth <martinroth(a)google.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/soc/amd/picasso/mca.c
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Martin Roth: Looks good to me, approved
diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c
index 3c5b63f..c41708c 100644
--- a/src/soc/amd/picasso/mca.c
+++ b/src/soc/amd/picasso/mca.c
@@ -33,6 +33,11 @@
[22] = "PIE",
};
+static bool mca_has_expected_bank_count(void)
+{
+ return ARRAY_SIZE(mca_bank_name) == mca_get_bank_count();
+}
+
static bool mca_is_valid_bank(unsigned int bank)
{
return (bank < ARRAY_SIZE(mca_bank_name) && mca_bank_name[bank] != NULL);
@@ -70,7 +75,7 @@
struct mca_bank_status mci;
const unsigned int num_banks = mca_get_bank_count();
- if (ARRAY_SIZE(mca_bank_name) != num_banks)
+ if (!mca_has_expected_bank_count())
printk(BIOS_WARNING, "CPU has an unexpected number of MCA banks!\n");
for (unsigned int i = 0 ; i < num_banks ; i++) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/56294
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic6548d3ceeb9c00ad344fc0bb3d97893e17a43a9
Gerrit-Change-Number: 56294
Gerrit-PatchSet: 3
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged