Skip to content

Commit 04e48d4

Browse files
crawfxrdjackpot51
authored andcommitted
security/tpm/tspi: Clear TPM state if resume fails
Per TPM spec and edk2 reference, perform a TPM restart in the case that a TPM resume fails. Change-Id: I444ab3cb12acbff740b5b8d2a9f7bed06392e9ec Signed-off-by: Tim Crawford <[email protected]>
1 parent a7d1fea commit 04e48d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/security/tpm/tspi/tspi.c

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ static uint32_t tpm_setup_s3_helper(void)
7171

7272
default:
7373
printk(BIOS_ERR, "TPM: Resume failed (%#x).\n", result);
74+
if (CONFIG(TPM2)) {
75+
printk(BIOS_WARNING, "TPM: Clearing state\n");
76+
result = tlcl_startup();
77+
}
7478
break;
7579
}
7680

0 commit comments

Comments
 (0)