summaryrefslogtreecommitdiffstats
path: root/src/security
diff options
context:
space:
mode:
authorShelley Chen <shchen@google.com>2020-10-16 10:55:07 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-10-19 07:01:04 +0000
commitd5faa90df50c820ed3b79d4a5e479767efd73287 (patch)
treed13f7478d50924b5c653532243a2bedcbe285696 /src/security
parentdc667980f8ab78296e77b53d4afd1ce8d21dd2a6 (diff)
downloadcoreboot-d5faa90df50c820ed3b79d4a5e479767efd73287.tar.gz
coreboot-d5faa90df50c820ed3b79d4a5e479767efd73287.tar.bz2
coreboot-d5faa90df50c820ed3b79d4a5e479767efd73287.zip
security/vboot: Rename mem_init.h to mrc_cache_hash_tpm.h
As ongoing work for generalizing mrc_cache to be used by all platforms, we are pulling it out from fsp 2.0 and renaming it as mrc_cache_hash_tpm.h in security/vboot. BUG=b:150502246 BRANCH=None TEST=emerge-nami coreboot chromeos-bootimage Change-Id: I5a204bc3342a3462f177c3ed6b8443e31816091c Signed-off-by: Shelley Chen <shchen@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46508 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
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 bc500a29f5bd..24e7aafaa740 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 000000000000..a1ecd8bfcab9
--- /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_ */