diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-03-30 08:19:18 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-31 07:33:40 +0000 |
commit | cf08d59d6e82517ea9e748dc7b0d4136777ebc6f (patch) | |
tree | a3c07fff757ebe34ea62d7ff7e2eba04993dedda /zephyr/shim/src/tasks.c | |
parent | 0bbbfcb3ce24a118a6ef54c06b00d8e88ecf8fae (diff) | |
download | chrome-ec-cf08d59d6e82517ea9e748dc7b0d4136777ebc6f.tar.gz |
zephyr: Implement task_start_called
Fix task_start_called to return a correct value, not hardcoded 1.
The task_start_called is used before jumping to RW to prepare PD before
sysjump. If the PD tasks are not started, the preparation is not needed.
BUG=b:164421798
BRANCH=none
TEST=Flash DUT with bootimage with Zephyr included then boot with
the SoftSync enabled.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: Ib2a2dbdb56c109e51a31b5a6f20a42f1e181727b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2794141
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr/shim/src/tasks.c')
-rw-r--r-- | zephyr/shim/src/tasks.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c index 09534629e3..10b2987724 100644 --- a/zephyr/shim/src/tasks.c +++ b/zephyr/shim/src/tasks.c @@ -68,6 +68,7 @@ struct task_ctx { #define TASK_TEST(_name, _entry, _parameter, _size) \ CROS_EC_TASK(_name, _entry, _parameter, _size) static struct task_ctx shimmed_tasks[] = { CROS_EC_TASK_LIST }; +static int tasks_started; #undef CROS_EC_TASK #undef TASK_TEST @@ -250,6 +251,7 @@ void start_ec_tasks(void) task_entry, ctx, NULL, NULL, K_PRIO_PREEMPT(TASK_ID_COUNT - i - 1), 0, K_NO_WAIT); } + tasks_started = 1; } /* @@ -274,5 +276,5 @@ SYS_INIT(init_signals, POST_KERNEL, 50); int task_start_called(void) { - return 1; + return tasks_started; } |