Bug 185631 - Hardware has TPM 2.0, but /dev/tpm does not exist,
Summary: Hardware has TPM 2.0, but /dev/tpm does not exist,
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-30 04:45 UTC by Chris Murphy
Modified: 2019-12-02 19:22 UTC (History)
4 users (show)

See Also:
Kernel Version: 4.16.0-1.fc28.x86_64
Tree: Fedora
Regression: No


Attachments
journal.log (302.61 KB, text/x-log)
2016-10-30 04:45 UTC, Chris Murphy
Details
acpidump.tar.gz (66.51 KB, application/gzip)
2017-02-28 04:03 UTC, Chris Murphy
Details
HP spectre acpidump (163.80 KB, application/x-xz)
2018-12-06 22:57 UTC, Chris Murphy
Details

Description Chris Murphy 2016-10-30 04:45:03 UTC
Created attachment 243281 [details]
journal.log

[chris@f25h ~]$ journalctl -b-1 -o short-monotonic | grep -i tpm
[    0.000000] f25h.localdomain kernel: ACPI: TPM2 0x000000003CFF9000 000034 (v03 HPQOEM INSYDE   00000000 HP   00040000)
[    5.301603] f25h.localdomain kernel: tpm_crb MSFT0101:00: can't request region for resource [mem 0x3cf5f000-0x3cf5f02f]
[    5.303688] f25h.localdomain kernel: tpm_crb: probe of MSFT0101:00 failed with error -16
[    7.729147] f25h.localdomain rngd[785]: /dev/tpm0: No such file or directory



[chris@f25h ~]$ lsmod | grep tpm
tpm_crb                16384  0
tpm_tis                20480  0
tpm                    40960  2 tpm_crb,tpm_tis

[chris@f25h ~]$ sudo tcsd -f
TCSD TDDL ERROR: Could not find a device to open!

Hardware: HP Spectre 13-v021nr, with TPM 2.0 support
Comment 1 Thorsten Leemhuis 2016-11-05 17:03:56 UTC
This afaics should be fixed since Monday in mainline. If yes please close this bug; if not please let me know, as I'm tracking regressions for 4.9.
Comment 2 Chris Murphy 2016-11-05 20:33:53 UTC
4.9.0-0.rc3.git2.1.fc26.x86_64 a.k.a. v4.9-rc3-261-g577f12c

[    0.000000] ACPI: TPM2 0x000000003CFF9000 000034 (v03 HPQOEM INSYDE   00000000 HP   00040000)
[    5.193671] tpm_crb MSFT0101:00: can't request region for resource [mem 0x3cf5f000-0x3cf5f02f]
[    5.193754] tpm_crb: probe of MSFT0101:00 failed with error -16
Comment 3 Thorsten Leemhuis 2016-11-06 11:43:22 UTC
Looks like more fixes are still pending:
https://www.mail-archive.com/tpmdd-devel@lists.sourceforge.net/msg02010.html
Comment 4 Chris Murphy 2016-11-07 01:11:06 UTC
In this case, it's not a regression. The problem exists in 4.7.10 and 4.8.6.
Comment 5 Chris Murphy 2017-02-28 03:56:01 UTC
[    0.000000] DMI: HP HP Spectre Notebook/81A0, BIOS F.30 12/15/2016

[    0.000000] ACPI: TPM2 0x000000003AFF9000 000034 (v03 HPQOEM INSYDE   00000000 HP   00040000)
[    4.274450] tpm_crb MSFT0101:00: can't request region for resource [mem 0x3af5b000-0x3af5b02f]
[    4.275458] tpm_crb: probe of MSFT0101:00 failed with error -16
Comment 6 Chris Murphy 2017-02-28 04:03:41 UTC
Created attachment 254973 [details]
acpidump.tar.gz

acpidump -b; files of which are then tar'd up.
Comment 7 Chris Murphy 2018-04-05 05:50:13 UTC
It's still a problem. Latest firmware is applied.


[    0.000000] DMI: HP HP Spectre Notebook/81A0, BIOS F.40 02/26/2018

[    4.459766] tpm_crb MSFT0101:00: can't request region for resource [mem 0x3af5b000-0x3af5b02f]
[    4.461187] tpm_crb: probe of MSFT0101:00 failed with error -16
Comment 8 Simon Ausserlechner 2018-08-31 17:45:58 UTC
Could reproduce the problem for kernel 4.14.67 on an x86_64 platform, the error cause seems to be the same as in case of the original description.

trm_crb fails on requesting the region corresponding to the TPM2 control area structure (drivers/char/tpm/tpm_crb.c:502). This is because the control area structure is inside the ACPI NVS range which is marked as busy (its corresponding resource struct has flags IORESOURCE_BUSY).

*Details*

The control area structure (start address 0x3AF5B000) is outside the MSFT0101 range (represented by resource io_res, base address 0xFED40000). Therefore crb_map_res() (tpm_crb.c:431) calls devm_ioremap_resource() -> devm_request_mem_region() -> __request_region() (kernel/resource.c:1128).
__request_region() finally identifies the conflict with the ACPI NVS range which is marked as IORESOURCE_BUSY.
Comment 9 Chris Murphy 2018-12-06 22:57:12 UTC
Created attachment 279887 [details]
HP spectre acpidump

Replacing acpidump since the original reported laptop has had firmware updates since the original report.

HP Spectre Notebook, model W2K28UA
[    0.000000] DMI: HP HP Spectre Notebook/81A0, BIOS F.42 10/25/2018
Comment 10 Dan Gilson 2019-12-02 19:22:10 UTC
I have this problem too. 

dmesg | grep -i TPM
[    0.035012] ACPI: TPM2 0x000000007B7F9000 000034 (v03 INSYDE BDW-DE   00000000 ACPI 00040000)
[   28.078309] tpm_crb MSFT0101:00: can't request region for resource [mem 0x7b69b000-0x7b69b02f]
[   28.087953] tpm_crb: probe of MSFT0101:00 failed with error -16
[   28.823763] ima: No TPM chip found, activating TPM-bypass!

This is using master at 0be0ee71816b2b6725e2b4f32ad6726c9d729777.

Are there any other ways for fix this like a change to ACPI tables? I ask because I am a BIOS source customer. Fixing there would be faster for me.  And I could raise a bug against Insyde to have it placed into their source to fix other customers.

Note You need to log in before you can comment on or make changes to this bug.