summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2016-07-13 18:25:12 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2016-07-14 01:49:09 +0000
commitde8fb11bfd07d3fea2048b6848b8a183c31e2580 (patch)
tree2da71e7fbc350ef26bdc9b8c2b5ff259f43c7ec1
parentd65cb2f69a9318e84b80f87448e0485951212c65 (diff)
downloadchrome-ec-de8fb11bfd07d3fea2048b6848b8a183c31e2580.tar.gz
tpm: fire watchdog before executing commands
In certain test scenarios the tpm task is hogging all resource and causes watchdog resets. Let's kick the watchdog in every loop, Long calculations already have watchdog kicking in place. BRANCH=ToT BUG=none TEST=tests executed in rapid succession do not cause watchdog resets any more. Change-Id: Ifaad6f9b4af2218f601412a36a075b4b4275d56f Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/360229 Reviewed-by: Marius Schilder <mschilder@chromium.org> Tested-by: Marius Schilder <mschilder@chromium.org>
-rw-r--r--common/tpm_registers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/tpm_registers.c b/common/tpm_registers.c
index 8eb016adfe..50b0d694af 100644
--- a/common/tpm_registers.c
+++ b/common/tpm_registers.c
@@ -20,6 +20,7 @@
#include "tpm_manufacture.h"
#include "tpm_registers.h"
#include "util.h"
+#include "watchdog.h"
/* TPM2 library includes. */
#include "Platform.h" /* Keep this one on top. */
@@ -530,6 +531,8 @@ void tpm_task(void)
CPRINTF("%s: received fifo command 0x%04x\n",
__func__, command_code);
+ watchdog_reload();
+
#ifdef CONFIG_EXTENSION_COMMAND
if (command_code == CONFIG_EXTENSION_COMMAND) {
response_size = sizeof(tpm_.regs.data_fifo);