summaryrefslogtreecommitdiff
path: root/include/rollback.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rollback.h')
-rw-r--r--include/rollback.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/rollback.h b/include/rollback.h
index e33403b330..51f945e089 100644
--- a/include/rollback.h
+++ b/include/rollback.h
@@ -44,6 +44,19 @@ int rollback_add_entropy(uint8_t *data, unsigned int len);
*/
int rollback_lock(void);
+/**
+ * Obtain some weak entropy (i.e. not guaranteed to be high quality), based on
+ * sensors or timing events.
+ *
+ * Must be defined if CONFIG_ROLLBACK_SECRET_SIZE is set. May sleep.
+ *
+ * @param buffer Buffer to fill with entropy.
+ * @param len Buffer length.
+ *
+ * @return true if the buffer was filled, false on error.
+ */
+int board_get_entropy(void *buffer, int len);
+
#endif
#endif /* __CROS_EC_ROLLBACK_H */