summaryrefslogtreecommitdiff
path: root/include/vboot_hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/vboot_hash.h')
-rw-r--r--include/vboot_hash.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/vboot_hash.h b/include/vboot_hash.h
index 3d66a7c56d..126872393e 100644
--- a/include/vboot_hash.h
+++ b/include/vboot_hash.h
@@ -11,6 +11,23 @@
#include "common.h"
/**
+ * Get hash of RW image.
+ *
+ * Your task will be blocked until hash computation is done. Hashing can be
+ * aborted only due to internal errors (e.g. read error) but not external
+ * causes.
+ *
+ * This is expected to be called before tasks are initialized. If it's called
+ * after tasks are started, it may starve lower priority tasks.
+ *
+ * See chromium:1047870 for some optimization.
+ *
+ * @param dst (OUT) Address where computed hash is stored.
+ * @return enum ec_error_list.
+ */
+int vboot_get_rw_hash(const uint8_t **dst);
+
+/**
* Invalidate the hash if the hashed data overlaps the specified region.
*
* @param offset Region start offset in flash