summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-07-21 14:34:00 -0600
committerPatrick Georgi <pgeorgi@google.com>2021-07-26 07:30:48 +0000
commitca0606e04fd6e6f9ed2e11d31155a17bed3d3a12 (patch)
tree75d71fe6d79c4840830150bb78bd7d4b8317b963 /src/include
parente279d90d4de18a0333fc7650710b0dba7e2fcd7f (diff)
downloadcoreboot-ca0606e04fd6e6f9ed2e11d31155a17bed3d3a12.tar.gz
coreboot-ca0606e04fd6e6f9ed2e11d31155a17bed3d3a12.tar.bz2
coreboot-ca0606e04fd6e6f9ed2e11d31155a17bed3d3a12.zip
arch/x86,lib/thread: Enable thread support in romstage
This change does the following: * Pushes the cpu_info struct into the top of the stack (just like c_start.S). This is required so the cpu_info function works correctly. * Adds the thread.c to the romstage build. I only enabled this for romstage since I haven't done any tests in other stages, but in theory it should work for other stages. BUG=b:179699789 TEST=Boot guybrush with threads enabled in romstage Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I8e32e1c54dea0d0c85dd6d6753147099aa54b9b5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56494 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/thread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/thread.h b/src/include/thread.h
index 3c06cc531102..cb085b550996 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -38,7 +38,7 @@ int thread_run_until(struct thread_handle *handle, enum cb_err (*func)(void *),
/* Waits until the thread has terminated and returns the error code */
enum cb_err thread_join(struct thread_handle *handle);
-#if ENV_RAMSTAGE && CONFIG(COOP_MULTITASKING)
+#if (ENV_RAMSTAGE || ENV_ROMSTAGE) && CONFIG(COOP_MULTITASKING)
struct thread {
int id;