Masanori Ogino uploaded patch set #11 to the change originally created by Denis Carikli.
mb/lenovo/x60: Enable TPM
Enable the onboard TPM device in the devicetree, and select Kconfig
options to add the appropriate ASL code.
This is adapted from commit 3d02b9c7.
(mainboard/lenovo/{t430s,t420s,t520,t530,x220}: Add TPM 1.2 mainboard
support)
Without this, coreboot doesn't touch the device and generates no ACPI
entry for it. Thus, in GNU/Linux, it is not detected automatically.
You can, however, force the Linux kernel to scan buses by running the
following commands:
# modprobe -r tpm_tis
# modprobe tpm_tis force=1
Running the commands above outputs some messages to dmesg, although the
actual messages vary between kernel versions. With Linux 4.9.235:
tpm_tis tpm_tis: 1.2 TPM (device-id 0x3202, rev-id 5)
tpm tpm0: Issuing TPM_STARTUP
tpm tpm0: [Hardware Error]: Adjusting reported timeouts: A 10000->10000us B 10000->10000us C 0->750000us D 0->750000us
tpm tpm0: [Hardware Error]: Adjusting reported timeouts: A 10000->10000us B 10000->10000us C 0->750000us D 0->750000us
tpm tpm0: TPM is disabled/deactivated (0x6)
Then /dev/tpm0 is created. The content of /sys/class/tpm/tpm0/caps is:
Manufacturer: 0x41544d4c
TCG version: 1.2
Firmware version: 11.5
With Linux 5.4.64:
tpm_tis tpm_tis: 1.2 TPM (device-id 0xFFFF, rev-id 255)
tpm tpm0: tpm_try_transmit: send(): error -5
tpm tpm0: A TPM error (-5) occurred attempting to determine the timeouts
tpm_tis tpm_tis: Could not get TPM timeouts and durations
In this case, tpm0 is not created.
Now, coreboot tries to initialize the device but fails to do so. From
the console log:
lpc_tpm: Read reg 0xf00 returns 0xffffffff
tis_probe: No TPM device found
TPM: Can't initialize.
While coreboot provides an ACPI entry anyway, for some reasons, Linux
still does not scan the device automatically.
See also previous discussions on LKML [1].
[1]: https://lore.kernel.org/lkml/?q=Regression+between+Linux+3.16+and+4.8%2F4.9+on+Lenovo+X60+with+coreboot
Change-Id: I6e65b37507c111af1c0c56822327d5497f58f085
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Masanori Ogino <mogino@acm.org>
---
M src/mainboard/lenovo/x60/Kconfig
M src/mainboard/lenovo/x60/devicetree.cb
2 files changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/13410/11
To view, visit change 13410. To unsubscribe, or for help writing mail filters, visit settings.