Attention is currently required from: Andrey Petrov, Patrick Rudolph.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59324 )
Change subject: [WIP] [DO NOT MERGE] src/drivers/intel/fsp2_0: Add FSP 2.3 support
......................................................................
Patch Set 1:
(2 comments)
File src/drivers/intel/fsp2_0/header_display.c:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-133357):
https://review.coreboot.org/c/coreboot/+/59324/comment/149f9366_edb376cb
PS1, Line 23: ((ext_revision.rev << 8) | revision.rev.revision),
line over 96 characters
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-133357):
https://review.coreboot.org/c/coreboot/+/59324/comment/a98c1021_acc37f8f
PS1, Line 24: ((ext_revision.bld_num << 8) | revision.rev.bld_num));
line over 96 characters
--
To view, visit https://review.coreboot.org/c/coreboot/+/59324
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ica1bd004286c785aa8a431f39d8efc69982874c1
Gerrit-Change-Number: 59324
Gerrit-PatchSet: 1
Gerrit-Owner: Anil Kumar K <anil.kumar.k(a)intel.com>
Gerrit-Reviewer: Andrey Petrov <andrey.petrov(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Andrey Petrov <andrey.petrov(a)gmail.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Tue, 16 Nov 2021 00:12:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Jason Glenesk, Marshall Dawson, Felix Held.
Hello Jason Glenesk, Marshall Dawson, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/59323
to look at the new patch set (#5).
Change subject: lib/thread,soc/amd/common: Delete thread_mutex
......................................................................
lib/thread,soc/amd/common: Delete thread_mutex
The functionality has been moved into `struct mutex`.
BUG=b:179699789
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: I9c6d00a72a37bcc3f9f772c96b61003c280c6b19
---
M src/include/thread.h
M src/lib/thread.c
M src/soc/amd/common/block/include/amdblocks/spi.h
M src/soc/amd/common/block/lpc/spi_dma.c
M src/soc/amd/common/block/spi/fch_spi_ctrl.c
M src/soc/amd/common/block/spi/fch_spi_util.c
6 files changed, 13 insertions(+), 40 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/59323/5
--
To view, visit https://review.coreboot.org/c/coreboot/+/59323
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9c6d00a72a37bcc3f9f772c96b61003c280c6b19
Gerrit-Change-Number: 59323
Gerrit-PatchSet: 5
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
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-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newpatchset
Raul Rangel has uploaded a new patch set (#4). ( https://review.coreboot.org/c/coreboot/+/59322 )
Change subject: arch/x86: Remove spinlock dependency on threading.
......................................................................
arch/x86: Remove spinlock dependency on threading.
Since we only have one spinlock caller left, we can move the
thread_coop_ calls out of the spinlock.
This is mostly a revert of CB:56320.
BUG=b:179699789
TEST=Boot guybrush to OS with threading enabled
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: I55d0cd2bcd82721098ca24ae2368bb6a16a07df4
---
M src/arch/x86/include/arch/smp/spinlock.h
M src/console/printk.c
2 files changed, 8 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/59322/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/59322
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I55d0cd2bcd82721098ca24ae2368bb6a16a07df4
Gerrit-Change-Number: 59322
Gerrit-PatchSet: 4
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Raul Rangel has uploaded a new patch set (#3). ( https://review.coreboot.org/c/coreboot/+/59322 )
Change subject: arch/x86: Remove spinlock dependency on threading.
......................................................................
arch/x86: Remove spinlock dependency on threading.
Since we only have one spinlock caller left, we can move the
thread_coop_ calls out of the spinlock.
This is mostly a revert of CB:56320.
BUG=b:179699789
TEST=Boot guybrush to OS with threading enabled
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: I55d0cd2bcd82721098ca24ae2368bb6a16a07df4
---
M src/arch/x86/include/arch/smp/spinlock.h
M src/console/printk.c
2 files changed, 9 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/59322/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/59322
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I55d0cd2bcd82721098ca24ae2368bb6a16a07df4
Gerrit-Change-Number: 59322
Gerrit-PatchSet: 3
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Raul Rangel has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/59320 )
Change subject: lib: Add a mutex
......................................................................
lib: Add a mutex
We currently have two synchronization primatives, spinlock and
thread_mutex. spinlock is meant to block multiple CPUs from entering a
critical section. thread_mutex is meant to block multiple coop-threads
from entering a critical section. It is not AP aware at all.
This CL introduces a mutex that can handle both concepts. The
implementation is using the GCC/LLVM atomic builtin functions. The
generated code uses the xchg instruction vs spinlock which uses (lock)
decb.
8: b0 01 mov $0x1,%al
a: 86 03 xchg %al,(%ebx)
c: 84 c0 test %al,%al
BUG=b:179699789
TEST=Boot guybrush to OS
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: I41e02a54a17b1f6513b36a0274e43fc715472d78
---
A src/include/mutex.h
M src/lib/Makefile.inc
A src/lib/mutex.c
3 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/59320/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/59320
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I41e02a54a17b1f6513b36a0274e43fc715472d78
Gerrit-Change-Number: 59320
Gerrit-PatchSet: 2
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59322 )
Change subject: arch/x86: Remove spinlock dependency on threading.
......................................................................
arch/x86: Remove spinlock dependency on threading.
Since we only have one spinlock caller left, we can move the
thread_coop_ calls out of the spinlock.
This is mostly a revert of CB:56320.
BUG=b:179699789
TEST=Boot guybrush to OS with threading enabled
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: I55d0cd2bcd82721098ca24ae2368bb6a16a07df4
---
M src/arch/x86/include/arch/smp/spinlock.h
M src/console/printk.c
2 files changed, 9 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/59322/1
diff --git a/src/arch/x86/include/arch/smp/spinlock.h b/src/arch/x86/include/arch/smp/spinlock.h
index c7008c1..f8fffdb 100644
--- a/src/arch/x86/include/arch/smp/spinlock.h
+++ b/src/arch/x86/include/arch/smp/spinlock.h
@@ -3,8 +3,6 @@
#ifndef ARCH_SMP_SPINLOCK_H
#define ARCH_SMP_SPINLOCK_H
-#include <thread.h>
-
/*
* Your basic SMP spinlocks, allowing only a single CPU anywhere
*/
@@ -52,16 +50,10 @@
__asm__ __volatile__(
spin_lock_string
: "=m" (lock->lock) : : "memory");
-
- /* Switching contexts while holding a spinlock will lead to deadlocks */
- thread_coop_disable();
-
}
static __always_inline void spin_unlock(spinlock_t *lock)
{
- thread_coop_enable();
-
__asm__ __volatile__(
spin_unlock_string
: "=m" (lock->lock) : : "memory");
diff --git a/src/console/printk.c b/src/console/printk.c
index 1ed39cb..99e0151 100644
--- a/src/console/printk.c
+++ b/src/console/printk.c
@@ -8,11 +8,12 @@
#include <console/console.h>
#include <console/streams.h>
#include <console/vtxprintf.h>
-#include <smp/spinlock.h>
#include <smp/node.h>
+#include <smp/spinlock.h>
+#include <thread.h>
#include <timer.h>
-DECLARE_SPIN_LOCK(console_lock)
+DECLARE_SPIN_LOCK(console_lock);
#define TRACK_CONSOLE_TIME (!ENV_SMM && CONFIG(HAVE_MONOTONIC_TIMER))
@@ -80,6 +81,10 @@
if (log_this < CONSOLE_LOG_FAST)
return 0;
+ /* Context switching while holding a spin lock can lead to a dead lock. */
+ thread_coop_disable();
+
+ /* We use a spinlock instead of a mutex to allow coop-threading to use printk. */
spin_lock(&console_lock);
console_time_run();
@@ -95,6 +100,8 @@
spin_unlock(&console_lock);
+ thread_coop_enable();
+
return i;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/59322
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I55d0cd2bcd82721098ca24ae2368bb6a16a07df4
Gerrit-Change-Number: 59322
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-MessageType: newchange