Re: [BUG] Nuvoton NCPT650 TPM 2.0 mode not working

From: Jarkko Sakkinen
Date: Tue Nov 13 2018 - 05:50:54 EST


On Sun, Nov 11, 2018 at 10:11:33PM +0100, Michael Niewöhner wrote:
> Very strange... When I pull the power cord, then replug and boot, I get these
> dmesg messages:
> [ 0.000000] efi: ACPI
> 2.0=0x9ea78000 ACPI=0x9ea78000 SMBIOS=0x9f5e5000 SMBIOS
> 3.0=0x9f5e4000 MPS=0xfca00 ESRT=0x9c06e918 MEMATTR=0x99cb9018 TPMEventLog=0x
> 98d0c018
> [ 0.001794] ACPI: TPM2 0x000000009EAB1F70 000034 (v03 LENOVO TC-
> S06 00001260 AMI 00000000)
> [ 3.096587] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0xFE, rev-id 2)
> [ 3.105684] tpm tpm0: A TPM error (2314) occurred attempting the self test
>
> After a reboot I get those "ima: ..." message again. Pulling the plug seems to
> reset anything (the TPM).
>
> The PTT TPM 2.0 shows exactly the same behaviour.

The error in question is TPM_RC_TESTING i.e. TPM is still processing
selftests in the background.

It is clearly a regression but unfortanely it is harmless and unrelated
i.e. tpm2_do_selftest() should not print an error message because it
is legit behavior.

The function actually masks the whole error:

if (rc == TPM2_RC_TESTING)
rc = TPM2_RC_SUCCESS;

/Jarkko