tpm_tis TPM2.0 not detected on cold boot

From: Michael Niewöhner
Date: Sun Dec 16 2018 - 08:32:45 EST


Hi again,

after my UEFI firmware mod/hack to flash the newest available Nuvoton firmware
to the NCPT650 the selftest error went away. Since then the TPM worked without
any further problems, at least after warm reboots.

What I didn't notice before is that it does NOT work after a cold (re)boot.
There is no difference between Intel Firmware TPM and the Nuvoton TPM.
I can reproduce the error for both. I did not test TPM1.2 again.

dmesg warm (re)boot:
--------------------
> dmesg | grep -i tpm
[ 0.000000] efi: ACPI
2.0=0x9e07e000 ACPI=0x9e07e000 SMBIOS=0x9ebeb000 SMBIOS
3.0=0x9ebea000 MEMATTR=0x98fb2018 TPMEventLog=0x972bc018
[ 0.003368] ACPI: TPM2 0x000000009E0B7F70 000034 (v03 LENOVO TC-
S06 00001260 AMI 00000000)
[ 3.610138] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0xFE, rev-id 2)


dmesg cold boot with tpm_tis.interrupts=0 tpm_tis.force=1:
----------------------------------------------------------
> dmesg | grep -i tpm
[ 0.000000] Command line: initrd=\initrd-test console=ttyS0,115200n8
break=premount tpm_tis.interrupts=0 tpm_tis.force=1
[ 0.000000] efi: ACPI
2.0=0x9e07e000 ACPI=0x9e07e000 SMBIOS=0x9ebeb000 SMBIOS
3.0=0x9ebea000 MEMATTR=0x98fb2018 TPMEventLog=0x972bb018
[ 0.003531] ACPI: TPM2 0x000000009E0B7F70 000034 (v03 LENOVO TC-
S06 00001260 AMI 00000000)
[ 0.162005] Kernel command line: initrd=\initrd-test console=ttyS0,115200n8
break=premount tpm_tis.interrupts=0 tpm_tis.force=1
[ 3.616806] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0xFE, rev-id 2)
[ 3.683117] tpm_tis tpm_tis: can't request region for resource [mem
0xfed40000-0xfed44fff]
[ 3.691378] tpm_tis: probe of tpm_tis failed with error -16
[ 4.572539] ima: Error Communicating to TPM chip


dmesg cold boot:
----------------
> dmesg | grep -i tpm
[ 0.000000] Command line: initrd=\initrd-test console=ttyS0,115200n8
break=premount
[ 0.000000] efi: ACPI
2.0=0x9e07e000 ACPI=0x9e07e000 SMBIOS=0x9ebeb000 SMBIOS
3.0=0x9ebea000 MEMATTR=0x98fb2298 TPMEventLog=0x972bb018
[ 0.003559] ACPI: TPM2 0x000000009E0B7F70 000034 (v03 LENOVO TC-
S06 00001260 AMI 00000000)
[ 0.161958] Kernel command line: initrd=\initrd-test console=ttyS0,115200n8
break=premount
[ 5.245801] ima: No TPM chip found, activating TPM-bypass!


Any ideas how to debug this?

Thanks
Michael