diff options
-rw-r--r-- | src/security/tpm/Kconfig | 9 | ||||
-rw-r--r-- | src/security/tpm/tspi/tspi.c | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/security/tpm/Kconfig b/src/security/tpm/Kconfig index 3af6d69e2b..95c0bb9b7d 100644 --- a/src/security/tpm/Kconfig +++ b/src/security/tpm/Kconfig @@ -93,4 +93,13 @@ config TPM_RDRESP_NEED_DELAY to work around a race-condition-related issue, possibly caused by ill-programmed TPM firmware. +config TPM_STARTUP_IGNORE_POSTINIT + bool + help + Select this to ignore POSTINIT INVALID return codes on TPM + startup. This is useful on platforms where a previous stage + issued a TPM startup. Examples of use cases are Intel TXT + or VBOOT on the Intel Nehalem northbridge which issues a + CPU-only reset during the romstage. + endmenu # Trusted Platform Module (tpm) diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c index 4698a4dc8c..966b8b7c77 100644 --- a/src/security/tpm/tspi/tspi.c +++ b/src/security/tpm/tspi/tspi.c @@ -141,6 +141,11 @@ uint32_t tpm_setup(int s3flag) } result = tlcl_startup(); + if (CONFIG(TPM_STARTUP_IGNORE_POSTINIT) + && result == TPM_E_INVALID_POSTINIT) { + printk(BIOS_DEBUG, "TPM: ignoring invalid POSTINIT\n"); + result = TPM_SUCCESS; + } if (result != TPM_SUCCESS) { printk(BIOS_ERR, "TPM: Can't run startup command.\n"); return tpm_setup_epilogue(result); |