diff options
author | Keith Short <keithshort@chromium.org> | 2021-03-08 16:26:41 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-09 21:27:38 +0000 |
commit | 0e5fa530e2f1eba6e16188be65ac39974a151a17 (patch) | |
tree | 1a5d694dc7527072837d713782763345d805dbd0 /zephyr | |
parent | 4d5b07d43ba15f5f704722649def0c18ea967871 (diff) | |
download | chrome-ec-0e5fa530e2f1eba6e16188be65ac39974a151a17.tar.gz |
vboot_hash: Add watchdog reloads
When neither CONFIG_SHA256_HW_ACCELERATE nor CONFIG_SHA256_UNROLLED
are enabled, calculating the hash can trip the watchdog.
Add watchdog reloads at a rate of 1/2 the watchdog period when both
these options are disabled.
BUG=b:182208446
BRANCH=none
TEST=zmake testall
TEST=Boot zephyr-ec on Volteer, powerdown AP and observe watchdog
timeouts are fixed
Signed-off-by: Keith Short <keithshort@chromium.org>
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I6170b457c91f3247adf9ad47cd7e93b128a1d13b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744356
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/app/ec/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zephyr/app/ec/main.c b/zephyr/app/ec/main.c index d0bf87475d..e297dae2d9 100644 --- a/zephyr/app/ec/main.c +++ b/zephyr/app/ec/main.c @@ -42,6 +42,10 @@ void main(void) } } + if (IS_ENABLED(CONFIG_PLATFORM_EC_WATCHDOG)) { + watchdog_init(); + } + if (IS_ENABLED(CONFIG_PLATFORM_EC_VBOOT)) { /* * For RO, it behaves as follows: @@ -52,10 +56,6 @@ void main(void) vboot_main(); } - if (IS_ENABLED(CONFIG_PLATFORM_EC_WATCHDOG)) { - watchdog_init(); - } - /* Call init hooks before main tasks start */ if (IS_ENABLED(CONFIG_PLATFORM_EC_HOOKS)) { hook_notify(HOOK_INIT); |