From d5faa90df50c820ed3b79d4a5e479767efd73287 Mon Sep 17 00:00:00 2001 From: Shelley Chen Date: Fri, 16 Oct 2020 10:55:07 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46508 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/security/vboot/mrc_cache_hash_tpm.c | 2 +- src/security/vboot/mrc_cache_hash_tpm.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/security/vboot/mrc_cache_hash_tpm.h (limited to 'src/security') 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 #include #include -#include +#include #include #include 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 + +/* + * 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_ */ -- cgit v1.2.3