summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
Diffstat (limited to 'src/security')
-rw-r--r--src/security/vboot/mrc_cache_hash_tpm.c2
-rw-r--r--src/security/vboot/mrc_cache_hash_tpm.h19
2 files changed, 20 insertions, 1 deletions
diff --git a/src/security/vboot/mrc_cache_hash_tpm.c b/src/security/vboot/mrc_cache_hash_tpm.c
index bc500a29f5..24e7aafaa7 100644
--- a/src/security/vboot/mrc_cache_hash_tpm.c
+++ b/src/security/vboot/mrc_cache_hash_tpm.c
@@ -5,7 +5,7 @@
#include <security/vboot/vboot_common.h>
#include <vb2_api.h>
#include <security/tpm/tss.h>
-#include <fsp/memory_init.h>
+#include <security/vboot/mrc_cache_hash_tpm.h>
#include <console/console.h>
#include <string.h>
diff --git a/src/security/vboot/mrc_cache_hash_tpm.h b/src/security/vboot/mrc_cache_hash_tpm.h
new file mode 100644
index 0000000000..a1ecd8bfca
--- /dev/null
+++ b/src/security/vboot/mrc_cache_hash_tpm.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef _MRC_CACHE_HASH_TPM_H_
+#define _MRC_CACHE_HASH_TPM_H_
+
+#include <types.h>
+
+/*
+ * Updates mrc cache hash if it differs.
+ */
+void mrc_cache_update_hash(const uint8_t *data, size_t size);
+
+/*
+ * Verifies mrc cache hash which is stored somewhere.
+ * return 1 verification was successful and 0 for error.
+ */
+int mrc_cache_verify_hash(const uint8_t *data, size_t size);
+
+#endif /* _MRC_CACHE_HASH_TPM_H_ */