summaryrefslogtreecommitdiff
path: root/board/cr50/tpm_nvmem_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cr50/tpm_nvmem_ops.c')
-rw-r--r--board/cr50/tpm_nvmem_ops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/board/cr50/tpm_nvmem_ops.c b/board/cr50/tpm_nvmem_ops.c
index 74f2ffbc79..92e8721b0a 100644
--- a/board/cr50/tpm_nvmem_ops.c
+++ b/board/cr50/tpm_nvmem_ops.c
@@ -14,6 +14,7 @@
#include "Global.h"
#include "Implementation.h"
#include "NV_fp.h"
+#include "PCR_fp.h"
#include "tpm_types.h"
#define CPRINTF(format, args...) cprintf(CC_TASK, format, ## args)
@@ -120,3 +121,8 @@ void tpm_orderly_state_restore(const char copy[TPM_ORDERLY_STATE_SIZE])
{
NvStateRestore(copy);
}
+
+bool get_tpm_pcr_value(uint32_t pcr_num, uint8_t value[SHA256_DIGEST_SIZE])
+{
+ return PCRGetValue(TPM_ALG_SHA256, pcr_num, SHA256_DIGEST_SIZE, value);
+}