diff options
author | Raul E Rangel <rrangel@chromium.org> | 2021-07-22 12:40:26 -0600 |
---|---|---|
committer | Werner Zeh <werner.zeh@siemens.com> | 2021-07-26 04:38:14 +0000 |
commit | 8c892070e94ca3131e0fe120544634877b8b133b (patch) | |
tree | 35d41e6304e9244ab71165862d0d2e143827c5ae | |
parent | 2f04e03e06152a8a27ed19832208372462aa7ce0 (diff) |
lib/thread: Guard thread_run_until with ENV_RAMSTAGE
thread_run_until is a ramstage specific API. This change guards the API
by checking ENV_RAMSTAGE.
BUG=b:179699789
TEST=Boot guybrush to the OS
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I4784942070fd352a48c349f3b65f5a299abf2800
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56529
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/lib/thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/thread.c b/src/lib/thread.c index 4d06021ea8..3be2e92f5c 100644 --- a/src/lib/thread.c +++ b/src/lib/thread.c @@ -313,6 +313,10 @@ int thread_run_until(struct thread_handle *handle, enum cb_err (*func)(void *), struct thread *t; struct block_boot_state *bbs; + /* This is a ramstage specific API */ + if (!ENV_RAMSTAGE) + dead_code(); + current = current_thread(); if (!thread_can_yield(current)) { |