summaryrefslogtreecommitdiff
path: root/common/vboot_hash.c
diff options
context:
space:
mode:
authorDivya Jyothi <divya.jyothi@intel.com>2015-06-25 20:19:37 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-01 03:49:00 +0000
commitb4c205bf51cfebeac1ddc7617dba24d8111bc9ed (patch)
treec1399d4ecbae939623505eed9b955e1b91f43e3f /common/vboot_hash.c
parentd2dabdae5d2b348f3c5fe3d13c64834451e214b5 (diff)
downloadchrome-ec-b4c205bf51cfebeac1ddc7617dba24d8111bc9ed.tar.gz
vboot_hash: Abort hash calculation on flash write
If flash is being written, any pending hash calculation is likely to be invalid. BRANCH=None BUG=chrome-os-partner:38103 TEST=on Cyan, run hundreds of flashrom cycles to make sure there are no read, erase or write errors Change-Id: I915f8db7998c56fc12e7d85173232882fb7ed80d Signed-off-by: Divya Jyothi <divya.jyothi@intel.com> Reviewed-on: https://chromium-review.googlesource.com/282211 Reviewed-by: Shawn N <shawnn@chromium.org> Commit-Queue: Bernie Thompson <bhthompson@chromium.org> Tested-by: Bernie Thompson <bhthompson@chromium.org>
Diffstat (limited to 'common/vboot_hash.c')
-rw-r--r--common/vboot_hash.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/vboot_hash.c b/common/vboot_hash.c
index 1d203e77f9..ff2c56fb59 100644
--- a/common/vboot_hash.c
+++ b/common/vboot_hash.c
@@ -43,10 +43,15 @@ static int in_progress;
static struct sha256_ctx ctx;
+int vboot_hash_in_progress(void)
+{
+ return in_progress;
+}
+
/**
* Abort hash currently in progress, and invalidate any completed hash.
*/
-static void vboot_hash_abort(void)
+void vboot_hash_abort(void)
{
if (in_progress) {
want_abort = 1;