Bug 195657

Summary: tpm_crb: devm_iomap_resource() fails with -16
Product: Drivers Reporter: Manuel Lauss (manuel.lauss)
Component: OtherAssignee: drivers_other
Status: NEW ---    
Severity: normal CC: chkas, dan_gilson, dominik.pieczynski, ivan.lazeev, mikajhe, soeren.grunewald, veiko.kukk
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.11 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg 4.11
ryzen fTPM support for tpm_crb driver
tpm.patch

Description Manuel Lauss 2017-05-04 17:24:49 UTC
Created attachment 256203 [details]
dmesg 4.11

This is an AMD Zen processor, with the on-chip TPM enabled:

[    0.000000] ACPI: TPM2 0x00000000DD779A40 000034 (v03        Tpm2Tabl 00000001 AMI  00000000)
[    0.740537] tpm_crb MSFT0101:00: can't request region for resource [mem 0xdd85c000-0xdd85cfff]
[    0.740560] tpm_crb: probe of MSFT0101:00 failed with error -16

The call to devm_ioremap_resource(dev, 0xdd85c000) in tpm_crb.c::crb_map_io() fails.

I'm adding TPM2 acpi table and /proc/iomem output.

Thanks!



[000h 0000   4]                    Signature : "TPM2"    [Trusted Platform Module hardware interface table]
[004h 0004   4]                 Table Length : 00000034
[008h 0008   1]                     Revision : 03
[009h 0009   1]                     Checksum : C3
[00Ah 0010   6]                       Oem ID : ""
[010h 0016   8]                 Oem Table ID : "Tpm2Tabl"
[018h 0024   4]                 Oem Revision : 00000001
[01Ch 0028   4]              Asl Compiler ID : "AMI "
[020h 0032   4]        Asl Compiler Revision : 00000000

[024h 0036   2]               Platform Class : 0000
[026h 0038   2]                     Reserved : 0000
[028h 0040   8]              Control Address : 00000000FDF10510
[030h 0048   4]                 Start Method : 00000002

Raw Table Data: Length 52 (0x34)

  0000: 54 50 4D 32 34 00 00 00 03 C3 00 00 00 00 00 00  // TPM24...........
  0010: 54 70 6D 32 54 61 62 6C 01 00 00 00 41 4D 49 20  // Tpm2Tabl....AMI 
  0020: 00 00 00 00 00 00 00 00 10 05 F1 FD 00 00 00 00  // ................
  0030: 02 00 00 00                                      // ....

----------------------------

00000000-00000fff : reserved
00001000-0009ffff : System RAM
000a0000-000fffff : reserved
  000a0000-000bffff : PCI Bus 0000:00
  000c0000-000dffff : PCI Bus 0000:00
  000f0000-000fffff : System ROM
00100000-01d7ffff : System RAM
01d80000-01ffffff : reserved
02000000-dd266fff : System RAM
dd267000-dd3a7fff : reserved
dd3a8000-dd765fff : System RAM
dd766000-dd875fff : ACPI Non-volatile Storage
  dd858000-dd858fff : MSFT0101:00
  dd85c000-dd85cfff : MSFT0101:00
dd876000-de324fff : reserved
de325000-de3dffff : reserved
de3e0000-deffffff : System RAM
df000000-dfffffff : reserved
e0000000-fec2ffff : PCI Bus 0000:00
  e0000000-f1ffffff : PCI Bus 0000:20
    e0000000-efffffff : 0000:20:00.0
      e0000000-e086ffff : BOOTFB
    f0000000-f1ffffff : 0000:20:00.0
  f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
    f8000000-fbffffff : reserved
      f8000000-fbffffff : pnp 00:00
  fc000000-fd0fffff : PCI Bus 0000:20
    fc000000-fcffffff : 0000:20:00.0
      fc000000-fcffffff : nvidia
    fd000000-fd07ffff : 0000:20:00.0
    fd080000-fd083fff : 0000:20:00.1
      fd080000-fd083fff : ICH HD audio
  fd200000-fd4fffff : PCI Bus 0000:21
    fd200000-fd2fffff : 0000:21:00.3
      fd200000-fd2fffff : xhci-hcd
    fd300000-fd3fffff : 0000:21:00.2
      fd300000-fd3fffff : ccp
    fd400000-fd401fff : 0000:21:00.2
      fd400000-fd401fff : ccp
  fd500000-fd6fffff : PCI Bus 0000:03
    fd500000-fd5fffff : PCI Bus 0000:04
      fd500000-fd5fffff : PCI Bus 0000:1e
        fd500000-fd503fff : 0000:1e:00.0
          fd500000-fd503fff : r8169
        fd504000-fd504fff : 0000:1e:00.0
          fd504000-fd504fff : r8169
    fd600000-fd67ffff : 0000:03:00.1
    fd680000-fd69ffff : 0000:03:00.1
      fd680000-fd69ffff : ahci
    fd6a0000-fd6a7fff : 0000:03:00.0
      fd6a0000-fd6a7fff : xhci-hcd
  fd700000-fd7fffff : PCI Bus 0000:22
    fd700000-fd707fff : 0000:22:00.3
      fd700000-fd707fff : ICH HD audio
    fd708000-fd708fff : 0000:22:00.2
      fd708000-fd708fff : ahci
  fd800000-fd8fffff : PCI Bus 0000:01
    fd800000-fd803fff : 0000:01:00.0
      fd800000-fd803fff : nvme
  fdf00000-fdffffff : reserved
  fea00000-fea0ffff : reserved
  feb80000-fec01fff : reserved
    feb80000-febfffff : amd_iommu
    fec00000-fec003ff : IOAPIC 0
    fec01000-fec013ff : IOAPIC 1
  fec10000-fec10fff : reserved
    fec10000-fec10fff : pnp 00:04
fec30000-fec30fff : reserved
  fec30000-fec30fff : AMDIF030:00
fed00000-fed00fff : reserved
  fed00000-fed003ff : HPET 0
    fed00000-fed003ff : PNP0103:00
fed40000-fed44fff : reserved
fed80000-fed8ffff : reserved
  fed81500-fed818ff : AMDI0030:00
fedc0000-fedc0fff : pnp 00:04
fedc2000-fedcffff : reserved
fedd4000-fedd5fff : reserved
fee00000-ffffffff : PCI Bus 0000:00
  fee00000-feefffff : reserved
    fee00000-fee00fff : Local APIC
      fee00000-fee00fff : pnp 00:04
  ff000000-ffffffff : reserved
    ff000000-ffffffff : pnp 00:04
100000000-101f37ffff : System RAM
  d31a00000-d323cfa46 : Kernel code
  d323cfa47-d328a3ebf : Kernel data
  d32981000-d32a19fff : Kernel bss
101f380000-101fffffff : RAM buffer
Comment 1 Soeren Grunewald 2018-01-04 12:16:52 UTC
The issue is still present in 4.15-rc6

> $ dmesg | grep -i tpm
> [    0.000000] ACPI: TPM2 0x00000000DD488C40 000034 (v03 ALASKA A M I   
> 00000001 AMI  00000000)
> [    4.700296] tpm_crb MSFT0101:00: can't request region for resource [mem
> 0xdd866000-0xdd866fff]
> [    4.700338] tpm_crb: probe of MSFT0101:00 failed with error -16
Comment 2 Soeren Grunewald 2018-01-04 12:24:54 UTC
See also https://bugzilla.kernel.org/show_bug.cgi?id=185631
Comment 3 chkas 2019-01-26 15:02:46 UTC
Same problem here:

$ cat /proc/version 
Linux version 4.19.0-1-amd64 ...

$ dmidecode | grep -A 9 "System Information"
System Information
	Manufacturer: Acer
	Product Name: TravelMate B117-M
	Version: V1.23
	Serial Number: xxxxxxxxxxxxxxxxxxxx
	UUID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
	Wake-up Type: Power Switch
	SKU Number: TravelMate B117-M_108C_1.23
	Family: BSW

newest available BIOS installed

tpm_crb MSFT0101:00: can't request region for resource [mem 0x7a628000-0x7a62802f]
tpm_crb: probe of MSFT0101:00 failed with error -16

after using the old? "devm_ioremap" in tpm_crb.c it works, but I don't know if this is safe

tpm_crb.c line: 458 function: crb_map_res

	.
	return devm_ioremap(dev, start, size);
	// return devm_ioremap_resource(dev, &new_res);
	.
Comment 4 Veiko 2019-03-28 14:38:42 UTC
Happens to me as well. TPM not working.

# dmesg |grep -i tpm
[    0.000000] efi:  ACPI 2.0=0xebe7e000  ACPI=0xebe7e000  SMBIOS=0xecca2000  SMBIOS 3.0=0xecca1000  ESRT=0xea0f5698  MEMATTR=0xe81ee018  TPMEventLog=0xe337c018 
[    0.000000] ACPI: TPM2 0x00000000EBE942A8 000034 (v04 ALASKA A M I    00000001 AMI  00000000)
[    0.494635] tpm_crb MSFT0101:00: can't request region for resource [mem 0xebf1c000-0xebf1cfff]
[    0.494636] tpm_crb: probe of MSFT0101:00 failed with error -16
[    0.602546] ima: No TPM chip found, activating TPM-bypass!

5.0.3-200.fc29.x86_64 #1 SMP Tue Mar 19 15:07:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

System Information
        Manufacturer: Gigabyte Technology Co., Ltd.
        Product Name: B450 I AORUS PRO WIFI

processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 23
model		: 8
model name	: AMD Ryzen 7 2700 Eight-Core Processor
stepping	: 2
microcode	: 0x800820b
cpu MHz		: 1377.307
cache size	: 512 KB
physical id	: 0
siblings	: 16
core id		: 0
cpu cores	: 8
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
bugs		: sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 6387.13
TLB size	: 2560 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14]

[root@server ~]# cat /proc/iomem 
00000000-00000fff : Reserved
00001000-0009ffff : System RAM
000a0000-000fffff : Reserved
  000a0000-000bffff : PCI Bus 0000:00
  000c0000-000dffff : PCI Bus 0000:00
  000f0000-000fffff : System ROM
00100000-09cfffff : System RAM
09d00000-09ffffff : Reserved
0a000000-0a1fffff : System RAM
0a200000-0a209fff : ACPI Non-volatile Storage
0a20a000-0affffff : System RAM
0b000000-0b01ffff : Reserved
0b020000-e336a017 : System RAM
e336a018-e337b057 : System RAM
e337b058-eb7dbfff : System RAM
eb7dc000-eb953fff : Reserved
eb954000-ebae4fff : System RAM
ebae5000-ebf36fff : ACPI Non-volatile Storage
  ebf18000-ebf18fff : MSFT0101:00
  ebf1c000-ebf1cfff : MSFT0101:00
ebf37000-ece6ffff : Reserved
ece70000-eeffffff : System RAM
ef000000-efffffff : Reserved
f0000000-fe9fffff : PCI Bus 0000:00
  f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
    f8000000-fbffffff : Reserved
      f8000000-fbffffff : pnp 00:00
  fd100000-fdffffff : Reserved
  fe200000-fe4fffff : PCI Bus 0000:0a
    fe200000-fe2fffff : 0000:0a:00.3
      fe200000-fe2fffff : xhci-hcd
    fe300000-fe3fffff : 0000:0a:00.2
      fe300000-fe3fffff : ccp
    fe400000-fe401fff : 0000:0a:00.2
      fe400000-fe401fff : ccp
  fe500000-fe7fffff : PCI Bus 0000:02
    fe500000-fe6fffff : PCI Bus 0000:03
      fe500000-fe5fffff : PCI Bus 0000:09
        fe500000-fe51ffff : 0000:09:00.0
          fe500000-fe51ffff : igb
        fe520000-fe523fff : 0000:09:00.0
          fe520000-fe523fff : igb
      fe600000-fe6fffff : PCI Bus 0000:07
        fe600000-fe603fff : 0000:07:00.0
          fe600000-fe603fff : iwlwifi
    fe700000-fe707fff : 0000:02:00.0
      fe700000-fe707fff : xhci-hcd
  fe800000-fe8fffff : PCI Bus 0000:0b
    fe800000-fe800fff : 0000:0b:00.2
      fe800000-fe800fff : ahci
  fe900000-fe9fffff : PCI Bus 0000:01
    fe900000-fe903fff : 0000:01:00.0
      fe900000-fe903fff : nvme
fea00000-fea0ffff : Reserved
feb00000-feb00007 : SB800 TCO
feb80000-fec01fff : Reserved
  feb80000-febfffff : amd_iommu
  fec00000-fec003ff : IOAPIC 0
  fec01000-fec013ff : IOAPIC 1
fec10000-fec10fff : Reserved
  fec10000-fec10fff : pnp 00:03
fec30000-fec30fff : Reserved
  fec30000-fec30fff : AMDIF030:00
    fec30000-fec30fff : AMDIF030:00
fed00000-fed00fff : Reserved
  fed00000-fed003ff : HPET 0
    fed00000-fed003ff : PNP0103:00
fed40000-fed44fff : Reserved
fed80000-fed8ffff : Reserved
  fed81500-fed818ff : AMDI0030:00
fedc0000-fedc0fff : pnp 00:03
fedc2000-fedcffff : Reserved
fedd4000-fedd5fff : Reserved
fee00000-feefffff : Reserved
  fee00000-fee00fff : Local APIC
    fee00000-fee00fff : pnp 00:03
ff000000-ffffffff : Reserved
  ff000000-ffffffff : pnp 00:03
100000000-80f37ffff : System RAM
  374000000-374c00e40 : Kernel code
  374c00e41-37557b8ff : Kernel data
  375b65000-375ffffff : Kernel bss
80f380000-80fffffff : RAM buffer
Comment 5 Vanya Lazeev 2019-07-14 12:46:47 UTC
Created attachment 283687 [details]
ryzen fTPM support for tpm_crb driver

This patch against 5.2 kernel seems to fix the problem for me on asrock x470 itx with ryzen 2600X.
Comment 6 mikajhe 2019-07-19 18:52:39 UTC
Not working in kernel v5.2.1 and Asus TUF B450 Pro Gaming, bios v1607, AMD Ryzen 5 2600 (fTPM)

/proc/iomem:
da5fa000-da741fff : Reserved
    da723000-da723fff : MSFT0101:00
    da727000-da727fff : MSFT0101:00

Jul 19 17:14:08 ryzen kernel: [ 0.935329] tpm_crb MSFT0101:00: can't request region for resource [mem 0xda723000-0xda726fff]
Jul 19 17:14:08 ryzen kernel: [ 0.935354] tpm_crb: probe of MSFT0101:00 failed with error -16
Comment 7 mikajhe 2019-07-19 20:30:09 UTC
(In reply to chkas from comment #3)

> tpm_crb.c line: 458 function: crb_map_res
> 
>       .
>       return devm_ioremap(dev, start, size);
>       // return devm_ioremap_resource(dev, &new_res);
>       .

With this mod tpm2-tools tpmtest seems working pretty well.
Comment 8 Vanya Lazeev 2019-07-20 08:34:31 UTC
Created attachment 283861 [details]
tpm.patch

The previous patch was incorrect (inverted).
Comment 9 Vanya Lazeev 2019-07-20 08:38:32 UTC
(In reply to mikajhe from comment #6)
> Not working in kernel v5.2.1 and Asus TUF B450 Pro Gaming, bios v1607, AMD
> Ryzen 5 2600 (fTPM)
> 
> /proc/iomem:
> da5fa000-da741fff : Reserved
>     da723000-da723fff : MSFT0101:00
>     da727000-da727fff : MSFT0101:00
> 
> Jul 19 17:14:08 ryzen kernel: [ 0.935329] tpm_crb MSFT0101:00: can't request
> region for resource [mem 0xda723000-0xda726fff]
> Jul 19 17:14:08 ryzen kernel: [ 0.935354] tpm_crb: probe of MSFT0101:00
> failed with error -16

Have you tried the attached patch? If not, could you do it?
Comment 10 mikajhe 2019-07-20 19:15:11 UTC
(In reply to Vanya Lazeev from comment #9)
> Have you tried the attached patch? If not, could you do it?

Hi, yes thanks, that patch seems to apply now on v5.2.1 and work in the same system as mentioned in comment #6
Comment 11 mikajhe 2019-07-21 21:19:53 UTC
The above mentioned patch seems to apply and work as such in v5.0.21 as well, so that is good for possible backporting efforts. Patch is ok for v5.0 as well, but my fTPM didn't seem to work very well in that version, as if TPM would go to sleep frequently and not execute commands as expected.
Comment 12 Dan Gilson 2019-12-02 22:24:53 UTC
I still see this problem against the master branch at 0be0ee71816b2b6725e2b4f32ad6726c9d729777 11 NOV 2019. 
And after installing the patch. 

/home/dgilson
[dgilson@PWP 504]$dmesg | grep -i tpm
[    0.035005] ACPI: TPM2 0x000000007B7F9000 000034 (v03 INSYDE BDW-DE   00000000 ACPI 00040000)
[   28.074061] tpm_crb MSFT0101:00: can't request region for resource [mem 0x7b69b000-0x7b69b02f]
[   28.083703] tpm_crb: probe of MSFT0101:00 failed with error -16
[   28.819778] ima: No TPM chip found, activating TPM-bypass!

/home/dgilson
[dgilson@PWP 503]$sudo cat /proc/iomem 
sudo: unable to resolve host PWP
00000000-00000fff : Reserved
00001000-0007ffff : System RAM
00080000-0009ffff : Reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-676fefff : System RAM
  57e00000-58c00e50 : Kernel code
  58c00e51-5964bb7f : Kernel data
  598e6000-59dfffff : Kernel bss
676ff000-679fefff : Unknown E820 type
679ff000-6f02efff : Reserved
  6ae45018-6ae4506f : APEI ERST
  6ae45070-6ae47017 : APEI ERST
6f02f000-7b69efff : ACPI Non-volatile Storage
7b69f000-7b7fefff : ACPI Tables
7b7ff000-7b7fffff : System RAM
7b800000-7bffffff : RAM buffer
80000000-8fffffff : PCI MMCONFIG 0000 [bus 00-ff]
  80000000-8fffffff : Reserved
90000000-fbffbfff : PCI Bus 0000:00
  91000000-920fffff : PCI Bus 0000:0a
    91000000-920fffff : PCI Bus 0000:0b
      91000000-91ffffff : 0000:0b:00.0
      92000000-9201ffff : 0000:0b:00.0
  92100000-921fffff : PCI Bus 0000:02
    92100000-92101fff : 0000:02:00.0
      92100000-92101fff : ioatdma
    92102000-92103fff : 0000:02:00.1
      92102000-92103fff : ioatdma
    92104000-92105fff : 0000:02:00.2
      92104000-92105fff : ioatdma
    92106000-92107fff : 0000:02:00.3
      92106000-92107fff : ioatdma
  92200000-926fffff : PCI Bus 0000:03
    92200000-923fffff : 0000:03:00.1
      92200000-923fffff : ixgbe
    92400000-925fffff : 0000:03:00.0
      92400000-925fffff : ixgbe
    92600000-92603fff : 0000:03:00.1
      92600000-92603fff : ixgbe
    92604000-92607fff : 0000:03:00.0
      92604000-92607fff : ixgbe
    92680000-926fffff : 0000:03:00.0
  92700000-92afffff : PCI Bus 0000:03
    92700000-927fffff : 0000:03:00.1
    92800000-928fffff : 0000:03:00.1
    92900000-929fffff : 0000:03:00.0
    92a00000-92afffff : 0000:03:00.0
  92b00000-92b0ffff : 0000:00:14.0
    92b00000-92b0ffff : xhci-hcd
  92b10000-92b107ff : 0000:00:1f.2
    92b10000-92b107ff : ahci
  92b11000-92b113ff : 0000:00:1d.0
    92b11000-92b113ff : ehci_hcd
  92b12000-92b123ff : 0000:00:1a.0
    92b12000-92b123ff : ehci_hcd
  92b13000-92b130ff : 0000:00:1f.3
  92b14000-92b1400f : 0000:00:16.0
  92b15000-92b1500f : 0000:00:16.1
  92b16000-92b16fff : 0000:00:05.4
fbffc000-fbffcfff : dmar0
feb00000-feb03fff : Reserved
fec00000-fec00fff : Reserved
  fec00000-fec003ff : IOAPIC 0
fec01000-fec013ff : IOAPIC 1
fed00000-fed003ff : HPET 0
  fed00000-fed003ff : PNP0103:00
fed18000-fed19fff : Reserved
fed1c000-fed1ffff : Reserved
  fed1c000-fed1ffff : pnp 00:04
    fed1f800-fed1f9ff : intel-spi
fed20000-fed3ffff : pnp 00:04
fed40000-fed44fff : MSFT0101:00
fed90000-fed93fff : pnp 00:04
fee00000-feefffff : pnp 00:04
  fee00000-fee00fff : Local APIC
ff000000-ffffffff : INT0800:00
  ff800000-ffffffff : Reserved
100000000-27fffffff : System RAM

/home/dgilson
[dgilson@PWP 505]$sudo cat /proc/iomem | grep -i 7b7f
sudo: unable to resolve host PWP
7b69f000-7b7fefff : ACPI Tables
7b7ff000-7b7fffff : System RAM



acpidump

TPM2 @ 0x0000000000000000
  0000: 54 50 4D 32 34 00 00 00 03 90 49 4E 53 59 44 45  TPM24.....INSYDE
  0010: 42 44 57 2D 44 45 00 00 00 00 00 00 41 43 50 49  BDW-DE......ACPI
  0020: 00 00 04 00 00 00 00 00 00 B0 69 7B 00 00 00 00  ..........i{....
  0030: 02 00 00 00                                      ....
Comment 13 Soeren Grunewald 2020-06-11 12:51:41 UTC
Not sure if this will be fixed, now that it states "Firmware Bug", but here some recent dumps

$ dmesg | egrep -i 'Linux version|DMI:|tpm|Ryzen'
[    0.000000] Linux version 5.6.18-300.fc32.x86_64 (mockbuild@bkernel01.iad2.fedoraproject.org) (gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) (GCC)) #1 SMP Wed Jun 10 21:38:25 UTC 2020
[    0.000000] efi:  TPMFinalLog=0xdd9f4000  ACPI 2.0=0xdd98a000  ACPI=0xdd98a000  SMBIOS=0xde478000  MEMATTR=0xda6f8318  ESRT=0xdafe1998  RNG=0xde493298  TPMEventLog=0xd7912018 
[    0.000000] DMI: Micro-Star International Co., Ltd. MS-7A34/B350 PC MATE (MS-7A34), BIOS A.J0 01/23/2019
[    0.000000] ACPI: TPM2 0x00000000DD9AFAE8 000034 (v04 ALASKA A M I    00000001 AMI  00000000)
[    0.106789] smpboot: CPU0: AMD Ryzen 5 1600X Six-Core Processor (family: 0x17, model: 0x1, stepping: 0x1)
[    0.682516] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xdda24000-0xdda24fff flags 0x200] vs dda24000 4000
[    0.682517] tpm_crb MSFT0101:00: can't request region for resource [mem 0xdda24000-0xdda24fff]
[    0.682520] tpm_crb: probe of MSFT0101:00 failed with error -16
[    0.797668] ima: No TPM chip found, activating TPM-bypass!

$ sudo cat /proc/iomem
00000000-00000fff : Reserved
00001000-0009ffff : System RAM
000a0000-000fffff : Reserved
  000a0000-000bffff : PCI Bus 0000:00
  000c0000-000dffff : PCI Bus 0000:00
  000f0000-000fffff : System ROM
00100000-09d7ffff : System RAM
09d80000-09ffffff : Reserved
0a000000-0a1fffff : System RAM
0a200000-0a209fff : ACPI Non-volatile Storage
0a20a000-0affffff : System RAM
0b000000-0b01ffff : Reserved
0b020000-d78e9017 : System RAM
d78e9018-d7902c57 : System RAM
d7902c58-d7903017 : System RAM
d7903018-d7911057 : System RAM
d7911058-d9d79fff : System RAM
d9d7a000-d9dbbfff : Reserved
d9dbc000-dafe0fff : System RAM
dafe1000-dafe1fff : Reserved
dafe2000-dd32afff : System RAM
dd32b000-dd46bfff : Reserved
dd46c000-dd8fafff : System RAM
dd8fb000-dda42fff : ACPI Non-volatile Storage
  dda24000-dda24fff : MSFT0101:00
  dda28000-dda28fff : MSFT0101:00
dda43000-de657fff : Reserved
de658000-deffffff : System RAM
df000000-dfffffff : Reserved
e0000000-fec2ffff : PCI Bus 0000:00
  e0000000-f01fffff : PCI Bus 0000:1c
    e0000000-f01fffff : PCI Bus 0000:1d
      e0000000-f01fffff : PCI Bus 0000:1e
        e0000000-efffffff : 0000:1e:00.0
        f0000000-f01fffff : 0000:1e:00.0
  f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
    f8000000-fbffffff : Reserved
      f8000000-fbffffff : pnp 00:00
  fd100000-fdffffff : Reserved
  fe200000-fe4fffff : PCI Bus 0000:1f
    fe200000-fe2fffff : 0000:1f:00.3
      fe200000-fe2fffff : xhci-hcd
    fe300000-fe3fffff : 0000:1f:00.2
      fe300000-fe3fffff : ccp
    fe400000-fe401fff : 0000:1f:00.2
      fe400000-fe401fff : ccp
  fe500000-fe6fffff : PCI Bus 0000:1c
    fe500000-fe5fffff : PCI Bus 0000:1d
      fe500000-fe5fffff : PCI Bus 0000:1e
        fe500000-fe57ffff : 0000:1e:00.0
        fe580000-fe59ffff : 0000:1e:00.0
        fe5a0000-fe5a3fff : 0000:1e:00.1
          fe5a0000-fe5a3fff : ICH HD audio
    fe600000-fe603fff : 0000:1c:00.0
  fe700000-fe8fffff : PCI Bus 0000:03
    fe700000-fe7fffff : PCI Bus 0000:16
      fe700000-fe7fffff : PCI Bus 0000:19
        fe700000-fe703fff : 0000:19:00.0
        fe704000-fe704fff : 0000:19:00.0
          fe704000-fe704fff : r8169
    fe800000-fe87ffff : 0000:03:00.1
    fe880000-fe89ffff : 0000:03:00.1
      fe880000-fe89ffff : ahci
    fe8a0000-fe8a7fff : 0000:03:00.0
      fe8a0000-fe8a7fff : xhci-hcd
  fe900000-fe9fffff : PCI Bus 0000:20
    fe900000-fe907fff : 0000:20:00.3
      fe900000-fe907fff : ICH HD audio
    fe908000-fe908fff : 0000:20:00.2
      fe908000-fe908fff : ahci
  fea00000-fea0ffff : Reserved
  feb80000-fec01fff : Reserved
    feb80000-febfffff : amd_iommu
    fec00000-fec003ff : IOAPIC 0
    fec01000-fec013ff : IOAPIC 1
  fec10000-fec10fff : Reserved
    fec10000-fec10fff : pnp 00:04
fec30000-fec30fff : Reserved
  fec30000-fec30fff : AMDIF030:00
    fec30000-fec30fff : AMDIF030:00
fed00000-fed00fff : Reserved
  fed00000-fed003ff : HPET 0
    fed00000-fed003ff : PNP0103:00
fed40000-fed44fff : Reserved
fed80000-fed8ffff : Reserved
  fed81500-fed818ff : AMDI0030:00
fedc0000-fedc0fff : pnp 00:04
fedc2000-fedcffff : Reserved
fedd4000-fedd5fff : Reserved
fee00000-ffffffff : PCI Bus 0000:00
  fee00000-feefffff : Reserved
    fee00000-fee00fff : Local APIC
      fee00000-fee00fff : pnp 00:04
  ff000000-ffffffff : Reserved
    ff000000-ffffffff : pnp 00:04
100000000-41f37ffff : System RAM
  245000000-245e00ea0 : Kernel code
  246000000-2464c0fff : Kernel rodata
  246600000-2468584bf : Kernel data
  247208000-2477fffff : Kernel bss
41f380000-41fffffff : RAM buffer

$ sudo acpidump
---8<---
TPM2 @ 0x0000000000000000
    0000: 54 50 4D 32 34 00 00 00 04 94 41 4C 41 53 4B 41  TPM24.....ALASKA
    0010: 41 20 4D 20 49 20 00 00 01 00 00 00 41 4D 49 20  A M I ......AMI 
    0020: 00 00 00 00 00 00 00 00 10 05 21 FD 00 00 00 00  ..........!.....
    0030: 02 00 00 00                                      ....
---8<---
Comment 14 Soeren Grunewald 2020-06-11 15:43:59 UTC
Now with debug output enabled and TPM switched to v1.2 instead of v2.0 in bios, maybe that helps.

$ dmesg | egrep -i 'Linux version|DMI:|tpm|Ryzen'
[    0.000000] Linux version 5.6.18-300.fc32.x86_64 (mockbuild@bkernel01.iad2.fedoraproject.org) (gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) (GCC)) #1 SMP Wed Jun 10 21:38:25 UTC 2020
[    0.000000] Command line: BOOT_IMAGE=(hd0,msdos2)/vmlinuz-5.6.18-300.fc32.x86_64 root=UUID=4e6f5f96-99be-475e-94c6-a9bb44e3acb6 ro rhgb quiet "dyndbg=module tpm_crb +p"
[    0.000000] efi:  TPMFinalLog=0xdd9f4000  ACPI 2.0=0xdd98a000  ACPI=0xdd98a000  SMBIOS=0xde478000  MEMATTR=0xda6f8318  ESRT=0xdafe1998  RNG=0xde493298  TPMEventLog=0xd7912018 
[    0.000000] [Firmware Bug]: TPM Final Events table missing or invalid
[    0.000000] DMI: Micro-Star International Co., Ltd. MS-7A34/B350 PC MATE (MS-7A34), BIOS A.J0 01/23/2019
[    0.000000] ACPI: TPM2 0x00000000DD9AFAE8 000034 (v04 ALASKA A M I    00000001 AMI  00000000)
[    0.000000] Kernel command line: BOOT_IMAGE=(hd0,msdos2)/vmlinuz-5.6.18-300.fc32.x86_64 root=UUID=4e6f5f96-99be-475e-94c6-a9bb44e3acb6 ro rhgb quiet "dyndbg=module tpm_crb +p"
[    0.106668] smpboot: CPU0: AMD Ryzen 5 1600X Six-Core Processor (family: 0x17, model: 0x1, stepping: 0x1)
[    0.681960] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xdda24000-0xdda24fff flags 0x200] vs dda24000 4000
[    0.681961] tpm_crb MSFT0101:00: cmd_hi = 0 cmd_low = DDA24000 cmd_size 1000
[    0.681962] tpm_crb MSFT0101:00: can't request region for resource [mem 0xdda24000-0xdda24fff]
[    0.681965] tpm_crb: probe of MSFT0101:00 failed with error -16
[    0.796951] ima: No TPM chip found, activating TPM-bypass!
[    2.565278]     dyndbg=module tpm_crb +p
Comment 15 Soeren Grunewald 2020-06-11 16:39:08 UTC
After digging a bit deeper, I tried the latest BIOS update for my board (which is marked as beta version) and it solved the issue :)