diff options
author | Ben Fennema <fennema@google.com> | 2016-11-07 11:59:29 -0800 |
---|---|---|
committer | Ben Fennema <fennema@google.com> | 2016-11-07 12:39:14 -0800 |
commit | 37699bac55377537ccf0501a02897590d51e8fba (patch) | |
tree | ae3b65fec584f73260ce0e19f8ddb76ca380085a | |
parent | affb06fc90e6eaf680027497fc48a9955c3169ae (diff) | |
download | contexthub-37699bac55377537ccf0501a02897590d51e8fba.tar.gz |
hostIntf: disable wdt when verifying os signature
Bootloader signature verification takes longer than the watchdog
timeout (causing a wdt reset in the middle of the verification)
Test: Download a signed kernel image and confirm no watchdog reset
Bug: 32703949
Change-Id: Ifbdc84608f7926902ad9f70d841d756fbfe7fb98
Signed-off-by: Ben Fennema <fennema@google.com>
-rw-r--r-- | firmware/src/nanohubCommand.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/src/nanohubCommand.c b/firmware/src/nanohubCommand.c index 076146a1..8be42f93 100644 --- a/firmware/src/nanohubCommand.c +++ b/firmware/src/nanohubCommand.c @@ -25,6 +25,7 @@ #include <plat/inc/taggedPtr.h> #include <plat/inc/bl.h> #include <plat/inc/plat.h> +#include <plat/inc/wdt.h> #include <nanohub/crc.h> #include <nanohub/rsa.h> @@ -313,10 +314,13 @@ static void deferredUpdateOs(void *cookie) // some sanity checks before asking BL to do image lookup hostIntfSetBusy(true); if (segSize >= (sizeof(*app) + sizeof(*os)) && segSize > os->size) { - if (osWriteShared(&os->marker, &marker, sizeof(os->marker))) + if (osWriteShared(&os->marker, &marker, sizeof(os->marker))) { + wdtDisableClk(); uploadStatus = BL.blVerifyOsUpdate(); - else + wdtEnableClk(); + } else { osLog(LOG_ERROR, "%s: could not set marker on OS image\n", __func__); + } } hostIntfSetBusy(false); osLog(LOG_INFO, "%s: status=%" PRIu32 "\n", __func__, uploadStatus); |