summaryrefslogtreecommitdiff
path: root/src/security/tpm/tspi
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-05-06 09:33:25 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-05-21 11:21:05 +0000
commitb0ccac097103d72e5f09d2ad272935833b5d695b (patch)
treeb62419dafdef5cd67c913c2744152bd96b78bb8c /src/security/tpm/tspi
parentd981c49038024cc9679114b92cadec51308b9ba8 (diff)
security/tpm/tspi/crtm: Fix FMAP TPM PCR
TPM_RUNTIME_DATA_PCR is for "for measuring data which changes during runtime e.g. CMOS, NVRAM..." according to comments. FMAP does not change during runtime. Change-Id: I23e61a2dc25cd1c1343fb438febaf8771d1c0621 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52968 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/security/tpm/tspi')
-rw-r--r--src/security/tpm/tspi/crtm.c2
-rw-r--r--src/security/tpm/tspi/crtm.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/security/tpm/tspi/crtm.c b/src/security/tpm/tspi/crtm.c
index 0841d23f13..147fc76bbf 100644
--- a/src/security/tpm/tspi/crtm.c
+++ b/src/security/tpm/tspi/crtm.c
@@ -61,7 +61,7 @@ uint32_t tspi_init_crtm(void)
struct region_device fmap;
if (fmap_locate_area_as_rdev("FMAP", &fmap) == 0) {
- if (tpm_measure_region(&fmap, TPM_RUNTIME_DATA_PCR, "FMAP: FMAP")) {
+ if (tpm_measure_region(&fmap, TPM_CRTM_PCR, "FMAP: FMAP")) {
printk(BIOS_ERR,
"TSPI: Couldn't measure FMAP into CRTM!\n");
return VB2_ERROR_UNKNOWN;
diff --git a/src/security/tpm/tspi/crtm.h b/src/security/tpm/tspi/crtm.h
index f3678ef033..f857ca7460 100644
--- a/src/security/tpm/tspi/crtm.h
+++ b/src/security/tpm/tspi/crtm.h
@@ -22,6 +22,7 @@
* itself.
*
* Summary:
+ * + Measures the FMAP FMAP partition.
* + Measures bootblock in CBFS or BOOTBLOCK FMAP partition.
* + If vboot starts in romstage, it measures the romstage
* in CBFS.