aboutsummaryrefslogtreecommitdiff
path: root/src/security/vboot/vboot_logic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/security/vboot/vboot_logic.c')
-rw-r--r--src/security/vboot/vboot_logic.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 2fc20fabd4..f3a6b415b8 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -393,15 +393,19 @@ void verstage_main(void)
vboot_reboot();
}
- timestamp_add_now(TS_START_TPMPCR);
- rv = extend_pcrs(&ctx);
- if (rv) {
- printk(BIOS_WARNING, "Failed to extend TPM PCRs (%#x)\n", rv);
- vb2api_fail(&ctx, VB2_RECOVERY_RO_TPM_U_ERROR, rv);
- save_if_needed(&ctx);
- vboot_reboot();
+ /* Only extend PCRs once on boot. */
+ if (!(ctx.flags & VB2_CONTEXT_S3_RESUME)) {
+ timestamp_add_now(TS_START_TPMPCR);
+ rv = extend_pcrs(&ctx);
+ if (rv) {
+ printk(BIOS_WARNING,
+ "Failed to extend TPM PCRs (%#x)\n", rv);
+ vb2api_fail(&ctx, VB2_RECOVERY_RO_TPM_U_ERROR, rv);
+ save_if_needed(&ctx);
+ vboot_reboot();
+ }
+ timestamp_add_now(TS_END_TPMPCR);
}
- timestamp_add_now(TS_END_TPMPCR);
/* Lock TPM */