coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
crtm.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __SECURITY_TSPI_CRTM_H__
4 #define __SECURITY_TSPI_CRTM_H__
5 
6 #include <program_loading.h>
7 #include <security/tpm/tspi.h>
8 #include <types.h>
9 #include <vb2_sha.h>
10 
11 /* CRTM */
12 #define TPM_CRTM_PCR 2
13 
14 /* PCR for measuring data which changes during runtime
15  * e.g. CMOS, NVRAM...
16  */
17 #define TPM_RUNTIME_DATA_PCR 3
18 
19 #define TPM_MEASURE_ALGO (CONFIG(TPM1) ? VB2_HASH_SHA1 : VB2_HASH_SHA256)
20 
21 /**
22  * Measure digests cached in TCPA log entries into PCRs
23  */
25 
26 /**
27  * Extend a measurement hash taken for a CBFS file into the appropriate PCR.
28  */
29 uint32_t tspi_cbfs_measurement(const char *name, uint32_t type, const struct vb2_hash *hash);
30 
31 #endif /* __SECURITY_TSPI_CRTM_H__ */
const char * name
Definition: mmu.c:92
uint32_t tspi_cbfs_measurement(const char *name, uint32_t type, const struct vb2_hash *hash)
Extend a measurement hash taken for a CBFS file into the appropriate PCR.
Definition: crtm.c:98
int tspi_measure_cache_to_pcr(void)
Measure digests cached in TCPA log entries into PCRs.
Definition: crtm.c:140
unsigned int type
Definition: edid.c:57
unsigned int uint32_t
Definition: stdint.h:14