Attention is currently required from: Raul Rangel, Furquan Shaikh.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56350 )
Change subject: lib/thread: Allow nesting thread_cooperate and thread_prevent_coop
......................................................................
Patch Set 1:
(4 comments)
File src/include/thread.h:
https://review.coreboot.org/c/coreboot/+/56350/comment/d584c901_8674f468
PS1, Line 54: void thread_prevent_coop(void);
While we're here, are we happy with the names for this? I feel like something that makes it a bit more obvious that they are matching pairs would be nice, maybe thread_enter_critical_section()/thread_exit_critical_section(), or thread_coop_disable()/thread_coop_enable()?
File src/lib/thread.c:
https://review.coreboot.org/c/coreboot/+/56350/comment/cd87d047_2ee5028d
PS1, Line 217: thread_cooperate();
I agree this doesn't belong here, but maybe it would be better to put it at the end of threads_initialize() rather than into the thread setup part. The die() call above, if it ever gets hit (which it shouldn't but whatever) might theoretically yield on some platforms during the console output and cause issues if the idle thread is not set up correctly.
https://review.coreboot.org/c/coreboot/+/56350/comment/45c56bb5_2b1ddab3
PS1, Line 34: return (t != NULL && t->can_yield > 0);
This check is a bit odd since under normal use can_yield should either be 0 or negative. Which I guess works but also seems a bit weird. I feel like an unsigned integer where 0 means "can yield" and critical section depth is counted upwards would be more intuitive (could call it critical_section_depth or something like that?).
https://review.coreboot.org/c/coreboot/+/56350/comment/1ea52a9a_a414923c
PS1, Line 363:
Would be good to assert() that we were in a critical section when this is called.
--
To view, visit https://review.coreboot.org/c/coreboot/+/56350
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I325ab6181b17c5c084ca1e2c181b4df235020557
Gerrit-Change-Number: 56350
Gerrit-PatchSet: 1
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-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Comment-Date: Thu, 15 Jul 2021 22:30:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Julius Werner, Eric Peers, Felix Held.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56229 )
Change subject: lib/thread: Add thread_handle
......................................................................
Patch Set 6:
(1 comment)
File src/include/thread.h:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-124333):
https://review.coreboot.org/c/coreboot/+/56229/comment/d5628a04_9b0f8c34
PS6, Line 36: enum cb_err (*entry)(void *);
function definition argument 'void *' should also have an identifier name
--
To view, visit https://review.coreboot.org/c/coreboot/+/56229
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie6f64d0c5a5acad4431a605f0b0b5100dc5358ff
Gerrit-Change-Number: 56229
Gerrit-PatchSet: 6
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Eric Peers <epeers(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Eric Peers <epeers(a)google.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 15 Jul 2021 22:28:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Jason Glenesk, Raul Rangel, Furquan Shaikh, Marshall Dawson, Eric Peers, Karthik Ramasubramanian, Felix Held.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56228 )
Change subject: soc/amd/common/block/lpc/spi_dma: Implement SPI DMA functionality
......................................................................
Patch Set 6:
(1 comment)
File src/soc/amd/common/block/lpc/Kconfig:
https://review.coreboot.org/c/coreboot/+/56228/comment/4ac1ab78_ce9872fc
PS6, Line 15: The SPI DMA controller
: is only functional on Cezanne, Renoir or later SoCs.
Rather than putting this in the help text, why not model it programmatically with depends on?
--
To view, visit https://review.coreboot.org/c/coreboot/+/56228
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0be555956581fd82bbe1482d8afa8828c61aaa01
Gerrit-Change-Number: 56228
Gerrit-PatchSet: 6
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: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Eric Peers <epeers(a)google.com>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Attention: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Attention: Eric Peers <epeers(a)google.com>
Gerrit-Attention: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 15 Jul 2021 22:16:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Raul Rangel has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/56268 )
Change subject: lib/timer: Make udelay respect input parameter
......................................................................
Abandoned
This CL was never meant to be published.
--
To view, visit https://review.coreboot.org/c/coreboot/+/56268
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I03c842ecef7641009f177a1458b88ca500dbfdb4
Gerrit-Change-Number: 56268
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: abandon
Attention is currently required from: Jason Glenesk, Raul Rangel, Marshall Dawson, Felix Held.
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56053 )
Change subject: soc/amd/{common,cezanne}: Implement HAVE_PAYLOAD_PRELOAD_CACHE
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/56053
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3ec78e628f24f2ba0c9fcf2a9e3bde64687eec44
Gerrit-Change-Number: 56053
Gerrit-PatchSet: 9
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-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Attention: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 15 Jul 2021 22:07:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56051 )
Change subject: lib/prog_loaders: Add payload_preload
......................................................................
Set Ready For Review
--
To view, visit https://review.coreboot.org/c/coreboot/+/56051
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifa8f30a0f4f931ece803c2e8e022e4d33d3fe581
Gerrit-Change-Number: 56051
Gerrit-PatchSet: 9
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Julius Werner <jwerner(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Comment-Date: Thu, 15 Jul 2021 22:06:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56352 )
Change subject: lib/thread: Move thread_run and thread_run_until outside of #if guard
......................................................................
lib/thread: Move thread_run and thread_run_until outside of #if guard
This will cause a linker error if these methods are used outside
ramstage.
BUG=b:179699789
TEST=compile guybrush w/ and w/o COOP_MULTITASKING
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
Change-Id: If9983fca939c8a15fa570481bfe016a388458830
---
M src/include/thread.h
1 file changed, 12 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/56352/1
diff --git a/src/include/thread.h b/src/include/thread.h
index aa1531d..5333da6 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -23,6 +23,18 @@
enum cb_err error;
};
+/* Run func(arrg) on a new thread. Return 0 on successful start of thread, < 0
+ * when thread could not be started. The thread handle if populated, will
+ * reflect the state and return code of the thread.
+ */
+int thread_run(struct thread_handle *handle, enum cb_err (*func)(void *), void *arg);
+
+/* thread_run_until is the same as thread_run() except that it blocks state
+ * transitions from occurring in the (state, seq) pair of the boot state
+ * machine. */
+int thread_run_until(struct thread_handle *handle, enum cb_err (*func)(void *), void *arg,
+ boot_state_t state, boot_state_sequence_t seq);
+
/* Waits until the thread has terminated and returns the error code */
enum cb_err thread_join(struct thread_handle *handle);
@@ -45,16 +57,6 @@
* aligned to CONFIG_STACK_SIZE, or NULL.
*/
void *arch_get_thread_stackbase(void);
-/* Run func(arrg) on a new thread. Return 0 on successful start of thread, < 0
- * when thread could not be started. The thread handle if populated, will
- * reflect the state and return code of the thread.
- */
-int thread_run(struct thread_handle *handle, enum cb_err (*func)(void *), void *arg);
-/* thread_run_until is the same as thread_run() except that it blocks state
- * transitions from occurring in the (state, seq) pair of the boot state
- * machine. */
-int thread_run_until(struct thread_handle *handle, enum cb_err (*func)(void *), void *arg,
- boot_state_t state, boot_state_sequence_t seq);
/* Return 0 on successful yield, < 0 when thread did not yield. */
int thread_yield(void);
@@ -92,16 +94,6 @@
asmlinkage void (*thread_entry)(void *), void *arg);
#else
static inline void threads_initialize(void) {}
-static inline int thread_run(struct thread_handle *handle, enum cb_err (*func)(void *),
- void *arg)
-{
- return -1;
-}
-static inline int thread_run_until(struct thread_handle *handle, enum cb_err (*func)(void *),
- void *arg, boot_state_t state, boot_state_sequence_t seq)
-{
- return -1;
-}
static inline int thread_yield(void)
{
return -1;
--
To view, visit https://review.coreboot.org/c/coreboot/+/56352
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If9983fca939c8a15fa570481bfe016a388458830
Gerrit-Change-Number: 56352
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-MessageType: newchange