Bug 98181

Summary: tpm_crb stacktrace: ioremap - invalid physical address
Product: Drivers Reporter: mick.saunders+kernel
Component: OtherAssignee: drivers_other
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: jarkko.sakkinen, kernel, kyle, michael, oscar, yuv.adm
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.0.1-1-ARCH Subsystem:
Regression: No Bisected commit-id:
Attachments: /sys/firmware/acpi/tables/TPM2

Description mick.saunders+kernel 2015-05-13 00:07:21 UTC
I'm getting a tpm_crb driver stacktrace on startup with Arch kernel 4.0.1-1-ARCH

I don't know how much information is relevant, so I'm just including anything I think might help. Let me know if you need more.

Attached is output from dmesg, I've included some ACPI init messages too:
[    1.827781] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    1.828034] ACPI: AC Adapter [AC] (on-line)
[    1.828419] EDAC MC: Ver: 3.0.0
[    1.829570] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input7
[    1.829575] ACPI: Power Button [PWRB]
[    1.829616] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input8
[    1.829618] ACPI: Sleep Button [SLPB]
[    1.829656] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input9
[    1.829699] ACPI: Lid Switch [LID0]
[    1.829750] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input10
[    1.829752] ACPI: Power Button [PWRF]
[    1.830455] ioremap: invalid physical address 42868948000000
[    1.830457] ------------[ cut here ]------------
[    1.830462] WARNING: CPU: 2 PID: 253 at arch/x86/mm/ioremap.c:99 __ioremap_caller+0x386/0x3b0()
[    1.830464] Modules linked in: tpm_crb(+) mei snd tpm edac_core shpchp soundcore button processor ac sch_fq_codel btrfs xor raid6_pq sd_mod hid_generic usbhid hid atkbd libps2 rtsx_pci_sdmmc ahci libahci xhci_pci ehci_pci libata xhci_hcd ehci_hcd usbcore scsi_mod rtsx_pci usb_common i8042 serio sdhci_acpi sdhci led_class mmc_core crc32c_intel
[    1.830482] CPU: 2 PID: 253 Comm: systemd-udevd Not tainted 4.0.1-1-ARCH #1
[    1.830483] Hardware name: Notebook                         P65_P67SG                       /P65_P67SG                       , BIOS 1.03.02 10/28/2014
[    1.830484]  0000000000000000 000000003a9519bd ffff880808f579d8 ffffffff8156de97
[    1.830487]  0000000000000000 0000000000000000 ffff880808f57a18 ffffffff81074d7a
[    1.830489]  ffff880808f579f8 0000000000000000 0042868a18868d48 00000000d0868d48
[    1.830491] Call Trace:
[    1.830497]  [<ffffffff8156de97>] dump_stack+0x4c/0x6e
[    1.830500]  [<ffffffff81074d7a>] warn_slowpath_common+0x8a/0xc0
[    1.830502]  [<ffffffff81074eaa>] warn_slowpath_null+0x1a/0x20
[    1.830504]  [<ffffffff81063486>] __ioremap_caller+0x386/0x3b0
[    1.830508]  [<ffffffff811bb88e>] ? __kmalloc_track_caller+0x1ae/0x1c0
[    1.830511]  [<ffffffff812d550a>] ? devm_ioremap_nocache+0x2a/0x80
[    1.830513]  [<ffffffff810634c7>] ioremap_nocache+0x17/0x20
[    1.830514]  [<ffffffff812d551d>] devm_ioremap_nocache+0x3d/0x80
[    1.830516]  [<ffffffffa01c3252>] crb_acpi_add+0x122/0x2e0 [tpm_crb]
[    1.830519]  [<ffffffff8134419a>] acpi_device_probe+0x50/0xf7
[    1.830522]  [<ffffffff813e3693>] driver_probe_device+0xa3/0x410
[    1.830524]  [<ffffffff813e3adb>] __driver_attach+0x9b/0xa0
[    1.830525]  [<ffffffff813e3a40>] ? __device_attach+0x40/0x40
[    1.830527]  [<ffffffff813e1583>] bus_for_each_dev+0x73/0xc0
[    1.830528]  [<ffffffff813e30ee>] driver_attach+0x1e/0x20
[    1.830530]  [<ffffffff813e2cb0>] bus_add_driver+0x180/0x250
[    1.830532]  [<ffffffffa0051000>] ? 0xffffffffa0051000
[    1.830533]  [<ffffffff813e4384>] driver_register+0x64/0xf0
[    1.830535]  [<ffffffff81344bbf>] acpi_bus_register_driver+0x3b/0x43
[    1.830537]  [<ffffffffa0051010>] crb_acpi_driver_init+0x10/0x1000 [tpm_crb]
[    1.830539]  [<ffffffff81002128>] do_one_initcall+0xb8/0x200
[    1.830541]  [<ffffffff8156d2bd>] do_init_module+0x60/0x1cb
[    1.830543]  [<ffffffff810fc4aa>] load_module+0x215a/0x27b0
[    1.830546]  [<ffffffff810f84d0>] ? store_uevent+0x70/0x70
[    1.830548]  [<ffffffff810fcc55>] SyS_init_module+0x155/0x1a0
[    1.830551]  [<ffffffff815737c9>] system_call_fastpath+0x12/0x17
[    1.830552] ---[ end trace 972bc6612e97f92c ]---
[    1.830554] tpm_crb MSFT0101:00: ioremap of the command buffer failed
[    1.830579] tpm_crb: probe of MSFT0101:00 failed with error -12


#uname -a
Linux somehost 4.0.1-1-ARCH #1 SMP PREEMPT Wed Apr 29 12:00:26 CEST 2015 x86_64 GNU/Linux

#modinfo tpm_crb
filename:       /lib/modules/4.0.1-1-ARCH/kernel/drivers/char/tpm/tpm_crb.ko.gz
license:        GPL
version:        0.1
description:    TPM2 Driver
author:         Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
srcversion:     E9D85C4FF02C82488A1A22F
alias:          acpi*:MSFT0101:*
depends:        tpm
intree:         Y
vermagic:       4.0.1-1-ARCH SMP preempt mod_unload modversions 

#modinfo tpm
filename:       /lib/modules/4.0.1-1-ARCH/kernel/drivers/char/tpm/tpm.ko.gz
license:        GPL
version:        2.0
description:    TPM Driver
author:         Leendert van Doorn (leendert@watson.ibm.com)
srcversion:     91145A6A29A3E4916F6B3B7
depends:        
intree:         Y
vermagic:       4.0.1-1-ARCH SMP preempt mod_unload modversions 
parm:           suspend_pcr:PCR to use for dummy writes to faciltate flush on suspend. (uint)

#list of ACPI devices under /sys/bus/acpi/devices/


#lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
00:1c.5 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 3D controller: NVIDIA Corporation GM204M [GeForce GTX 980M] (rev ff)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
04:00.0 Network controller: Intel Corporation Wireless 7265 (rev 48)

Hardware:
15" Laptop: Metabox (Clevo) P650SG
Core i7-4710HQ
NVIDIA GTX980M
32GB RAM


#ls -la /sys/bus/acpi/devices/
total 0
drwxr-xr-x 2 root root 0 May 13 09:32 .
drwxr-xr-x 4 root root 0 May 13 09:32 ..
lrwxrwxrwx 1 root root 0 May 13 09:12 ACPI0003:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ALP0001:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/ALP0001:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ATML1000:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/ATML1000:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ATML2000:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/ATML2000:00
lrwxrwxrwx 1 root root 0 May 13 09:12 BCM2E20:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C5:00/BCM2E20:00
lrwxrwxrwx 1 root root 0 May 13 09:12 CYP0001:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/CYP0001:00
lrwxrwxrwx 1 root root 0 May 13 09:12 device:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00
lrwxrwxrwx 1 root root 0 May 13 09:12 device:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/device:01
lrwxrwxrwx 1 root root 0 May 13 09:12 device:02 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:02
lrwxrwxrwx 1 root root 0 May 13 09:12 device:03 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:02/device:03
lrwxrwxrwx 1 root root 0 May 13 09:12 device:04 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:04
lrwxrwxrwx 1 root root 0 May 13 09:12 device:05 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:04/device:05
lrwxrwxrwx 1 root root 0 May 13 09:12 device:06 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:06
lrwxrwxrwx 1 root root 0 May 13 09:12 device:07 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:06/device:07
lrwxrwxrwx 1 root root 0 May 13 09:12 device:08 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:08
lrwxrwxrwx 1 root root 0 May 13 09:12 device:09 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:08/device:09
lrwxrwxrwx 1 root root 0 May 13 09:12 device:0a -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:08/device:0a
lrwxrwxrwx 1 root root 0 May 13 09:12 device:0b -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0b
lrwxrwxrwx 1 root root 0 May 13 09:12 device:0c -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0b/device:0c
lrwxrwxrwx 1 root root 0 May 13 09:12 device:0d -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0d
lrwxrwxrwx 1 root root 0 May 13 09:12 device:0e -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0d/device:0e
lrwxrwxrwx 1 root root 0 May 13 09:12 device:0f -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0f
lrwxrwxrwx 1 root root 0 May 13 09:12 device:10 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0f/device:10
lrwxrwxrwx 1 root root 0 May 13 09:12 device:11 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:11
lrwxrwxrwx 1 root root 0 May 13 09:12 device:12 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12
lrwxrwxrwx 1 root root 0 May 13 09:12 device:13 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:13
lrwxrwxrwx 1 root root 0 May 13 09:12 device:14 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14
lrwxrwxrwx 1 root root 0 May 13 09:12 device:15 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15
lrwxrwxrwx 1 root root 0 May 13 09:12 device:16 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16
lrwxrwxrwx 1 root root 0 May 13 09:12 device:17 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:17
lrwxrwxrwx 1 root root 0 May 13 09:12 device:18 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:18
lrwxrwxrwx 1 root root 0 May 13 09:12 device:19 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:19
lrwxrwxrwx 1 root root 0 May 13 09:12 device:1a -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:1a
lrwxrwxrwx 1 root root 0 May 13 09:12 device:1b -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:1b
lrwxrwxrwx 1 root root 0 May 13 09:12 device:1c -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:1c
lrwxrwxrwx 1 root root 0 May 13 09:12 device:1d -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:1d
lrwxrwxrwx 1 root root 0 May 13 09:12 device:1e -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:14/device:15/device:16/device:1e
lrwxrwxrwx 1 root root 0 May 13 09:12 device:1f -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f
lrwxrwxrwx 1 root root 0 May 13 09:12 device:20 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20
lrwxrwxrwx 1 root root 0 May 13 09:12 device:21 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21
lrwxrwxrwx 1 root root 0 May 13 09:12 device:22 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21/device:22
lrwxrwxrwx 1 root root 0 May 13 09:12 device:23 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21/device:23
lrwxrwxrwx 1 root root 0 May 13 09:12 device:24 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21/device:24
lrwxrwxrwx 1 root root 0 May 13 09:12 device:25 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21/device:25
lrwxrwxrwx 1 root root 0 May 13 09:12 device:26 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21/device:25/device:26
lrwxrwxrwx 1 root root 0 May 13 09:12 device:27 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21/device:27
lrwxrwxrwx 1 root root 0 May 13 09:12 device:28 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1f/device:20/device:21/device:28
lrwxrwxrwx 1 root root 0 May 13 09:12 device:29 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29
lrwxrwxrwx 1 root root 0 May 13 09:12 device:2a -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a
lrwxrwxrwx 1 root root 0 May 13 09:12 device:2b -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:2b
lrwxrwxrwx 1 root root 0 May 13 09:12 device:2c -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:2c
lrwxrwxrwx 1 root root 0 May 13 09:12 device:2d -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:2d
lrwxrwxrwx 1 root root 0 May 13 09:12 device:2e -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:2e
lrwxrwxrwx 1 root root 0 May 13 09:12 device:2f -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:2f
lrwxrwxrwx 1 root root 0 May 13 09:12 device:30 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:30
lrwxrwxrwx 1 root root 0 May 13 09:12 device:31 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:31
lrwxrwxrwx 1 root root 0 May 13 09:12 device:32 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:32
lrwxrwxrwx 1 root root 0 May 13 09:12 device:33 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:33
lrwxrwxrwx 1 root root 0 May 13 09:12 device:34 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:34
lrwxrwxrwx 1 root root 0 May 13 09:12 device:35 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:34/device:35
lrwxrwxrwx 1 root root 0 May 13 09:12 device:36 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:36
lrwxrwxrwx 1 root root 0 May 13 09:12 device:37 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:37
lrwxrwxrwx 1 root root 0 May 13 09:12 device:38 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:38
lrwxrwxrwx 1 root root 0 May 13 09:12 device:39 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:39
lrwxrwxrwx 1 root root 0 May 13 09:12 device:3a -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:3a
lrwxrwxrwx 1 root root 0 May 13 09:12 device:3b -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:3b
lrwxrwxrwx 1 root root 0 May 13 09:12 device:3c -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:3c
lrwxrwxrwx 1 root root 0 May 13 09:12 device:3d -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:3d
lrwxrwxrwx 1 root root 0 May 13 09:12 device:3e -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:3e
lrwxrwxrwx 1 root root 0 May 13 09:12 device:3f -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:3f
lrwxrwxrwx 1 root root 0 May 13 09:12 device:40 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:29/device:2a/device:40
lrwxrwxrwx 1 root root 0 May 13 09:12 device:41 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:41
lrwxrwxrwx 1 root root 0 May 13 09:12 device:42 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C6:00/device:42
lrwxrwxrwx 1 root root 0 May 13 09:12 device:43 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C8:00/device:43
lrwxrwxrwx 1 root root 0 May 13 09:12 device:44 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C8:00/device:44
lrwxrwxrwx 1 root root 0 May 13 09:12 device:45 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45
lrwxrwxrwx 1 root root 0 May 13 09:12 device:46 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:46
lrwxrwxrwx 1 root root 0 May 13 09:12 device:47 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:47
lrwxrwxrwx 1 root root 0 May 13 09:12 device:48 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:48
lrwxrwxrwx 1 root root 0 May 13 09:12 device:49 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:49
lrwxrwxrwx 1 root root 0 May 13 09:12 device:4a -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:4a
lrwxrwxrwx 1 root root 0 May 13 09:12 device:4b -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:4b
lrwxrwxrwx 1 root root 0 May 13 09:12 device:4c -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:4c
lrwxrwxrwx 1 root root 0 May 13 09:12 device:4d -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:4d
lrwxrwxrwx 1 root root 0 May 13 09:12 device:4e -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:45/device:4e
lrwxrwxrwx 1 root root 0 May 13 09:12 device:4f -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4f
lrwxrwxrwx 1 root root 0 May 13 09:12 device:50 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:50
lrwxrwxrwx 1 root root 0 May 13 09:12 device:51 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:51
lrwxrwxrwx 1 root root 0 May 13 09:12 device:52 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:51/device:52
lrwxrwxrwx 1 root root 0 May 13 09:12 device:53 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:53
lrwxrwxrwx 1 root root 0 May 13 09:12 device:54 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/device:54
lrwxrwxrwx 1 root root 0 May 13 09:12 device:55 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/device:55
lrwxrwxrwx 1 root root 0 May 13 09:12 device:56 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/device:56
lrwxrwxrwx 1 root root 0 May 13 09:12 device:57 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/device:57
lrwxrwxrwx 1 root root 0 May 13 09:12 EETI7900:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/EETI7900:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ELAN1000:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/ELAN1000:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ELAN1001:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/ELAN1001:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ELAN1010:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/ELAN1010:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ETD0403:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/ETD0403:00
lrwxrwxrwx 1 root root 0 May 13 09:12 ICV0A12:00 -> ../../../devices/LNXSYSTM:00/ICV0A12:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT0800:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/INT0800:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33A1:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/INT33A1:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C0:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C0:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C1:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C1:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C2:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C2:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C3:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C4:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C4:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C5:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C5:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C6:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C6:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C7:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C7:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C8:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C8:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33C9:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C2:00/INT33C9:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33CA:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C2:00/INT33CA:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33CB:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C2:00/INT33CB:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33D1:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C2:00/INT33D1:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33D7:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C2:00/INT33D7:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33E0:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C4:00/INT33E0:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT33E0:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C5:00/INT33E0:01
lrwxrwxrwx 1 root root 0 May 13 09:12 INT340E:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/INT340E:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INT3F0D:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/INT3F0D:00
lrwxrwxrwx 1 root root 0 May 13 09:12 INTL9C60:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INTL9C60:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:00 -> ../../../devices/LNXSYSTM:00/LNXCPU:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:01 -> ../../../devices/LNXSYSTM:00/LNXCPU:01
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:02 -> ../../../devices/LNXSYSTM:00/LNXCPU:02
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:03 -> ../../../devices/LNXSYSTM:00/LNXCPU:03
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:04 -> ../../../devices/LNXSYSTM:00/LNXCPU:04
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:05 -> ../../../devices/LNXSYSTM:00/LNXCPU:05
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:06 -> ../../../devices/LNXSYSTM:00/LNXCPU:06
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXCPU:07 -> ../../../devices/LNXSYSTM:00/LNXCPU:07
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXPOWER:00 -> ../../../devices/LNXSYSTM:00/LNXPOWER:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXPOWER:01 -> ../../../devices/LNXSYSTM:00/LNXPOWER:01
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXPWRBN:00 -> ../../../devices/LNXSYSTM:00/LNXPWRBN:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXSYBUS:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXSYBUS:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:01
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXSYSTM:00 -> ../../../devices/LNXSYSTM:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXTHERM:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:01/LNXTHERM:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXVIDEO:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:51/LNXVIDEO:00
lrwxrwxrwx 1 root root 0 May 13 09:12 LNXVIDEO:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01
lrwxrwxrwx 1 root root 0 May 13 09:12 MSFT0001:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/MSFT0001:00
lrwxrwxrwx 1 root root 0 May 13 09:12 MSFT0001:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/MSFT0001:01
lrwxrwxrwx 1 root root 0 May 13 09:12 MSFT0003:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/MSFT0003:00
lrwxrwxrwx 1 root root 0 May 13 09:12 MSFT0101:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/MSFT0101:00
lrwxrwxrwx 1 root root 0 May 13 09:12 MSFT0101:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/MSFT0101:01
lrwxrwxrwx 1 root root 0 May 13 09:12 MSFT1111:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C2:00/MSFT1111:00
lrwxrwxrwx 1 root root 0 May 13 09:12 NTRG0001:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/NTRG0001:00
lrwxrwxrwx 1 root root 0 May 13 09:12 NXP5442:00 -> ../../../devices/LNXSYSTM:00/NXP5442:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0000:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0000:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0100:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0100:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0103:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0103:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0200:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0200:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0A08:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0B00:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0B00:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C01:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/PNP0C01:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C01:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C01:01
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C02:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0C02:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C02:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0C02:01
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C02:02 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/PNP0C02:02
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C02:03 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/PNP0C02:03
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C04:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0C04:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C09:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/PNP0C09:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0A:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0C:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0D:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0E:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:01
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:02 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:02
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:03 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:03
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:04 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:04
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:05 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:05
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:06 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:06
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C0F:07 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:07
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C14:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/PNP0C14:00
lrwxrwxrwx 1 root root 0 May 13 09:12 PNP0C14:01 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C14:01
lrwxrwxrwx 1 root root 0 May 13 09:12 PNPC000:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNPC000:00
lrwxrwxrwx 1 root root 0 May 13 09:12 SKTD000:00 -> ../../../devices/LNXSYSTM:00/SKTD000:00
lrwxrwxrwx 1 root root 0 May 13 09:12 STU0605:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/STU0605:00
lrwxrwxrwx 1 root root 0 May 13 09:12 SYN1214:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:12/SYN1214:00
lrwxrwxrwx 1 root root 0 May 13 09:12 SYNA2393:00 -> ../../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/INT33C3:00/SYNA2393:00

#for x in /sys/bus/acpi/devices/MSFT0101\:00/*; do echo $x; cat $x; echo ------; done
/sys/bus/acpi/devices/MSFT0101:00/description
TPM 2.0 Device
------
/sys/bus/acpi/devices/MSFT0101:00/hid
MSFT0101
------
/sys/bus/acpi/devices/MSFT0101:00/modalias
acpi:MSFT0101:
------
/sys/bus/acpi/devices/MSFT0101:00/path
\_SB_.TPM_
------
/sys/bus/acpi/devices/MSFT0101:00/physical_node
cat: /sys/bus/acpi/devices/MSFT0101:00/physical_node: Is a directory
------
/sys/bus/acpi/devices/MSFT0101:00/power
cat: /sys/bus/acpi/devices/MSFT0101:00/power: Is a directory
------
/sys/bus/acpi/devices/MSFT0101:00/status
15
------
/sys/bus/acpi/devices/MSFT0101:00/subsystem
cat: /sys/bus/acpi/devices/MSFT0101:00/subsystem: Is a directory
------
/sys/bus/acpi/devices/MSFT0101:00/uevent
MODALIAS=acpi:MSFT0101:
------
/sys/bus/acpi/devices/MSFT0101:00/uid
1
------
Comment 1 jarkko.sakkinen 2015-05-22 12:28:06 UTC
Looking into this.
Comment 2 jarkko.sakkinen 2015-06-03 13:53:21 UTC
Could you provide dump of TPM2 ACPI table: /sys/firmware/acpi/tables/TPM2
(i.e. cp and attach it to the bug).
Comment 3 mick.saunders+kernel 2015-06-04 13:47:04 UTC
No worries. I should be able to provide this tomorrow.
Comment 4 mick.saunders+kernel 2015-06-05 06:57:40 UTC
Created attachment 178871 [details]
/sys/firmware/acpi/tables/TPM2
Comment 5 jarkko.sakkinen 2015-06-05 14:51:39 UTC
I think the BIOS gives a corrupted table:

$ xxd -c8 -p TPM2  | sed -e 's/.\{2\}/& /g' 
54 50 4d 32 34 00 00 00 
03 c2 00 00 00 00 00 00 
54 70 6d 32 54 61 62 6c 
01 00 00 00 41 4d 49 20 
00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 
06 00 00 00 

Looking at the end of the dump there is field called "the start method". Without going into details the number six looks like a bogus value for this field.

The 8 bytes before it specify the physical address of the control area (memory mapped interface for sending commands to TPM). It is set to zero, which is obviously a bogus value.

This is a bug in your AMI BIOS. I would suggest updating the BIOS and if that does not work you should report this issue to AMI.
Comment 6 jarkko.sakkinen 2015-06-08 11:42:36 UTC
I talked about the bug with Matt Fleming and his position was that there should be a workaround for this BIOS bug. I tend to agree because it is fairly easy to recognize (physical address of the control area is zero).

I've already planned how to workaround this and will be submitting a fix as soon as possible.
Comment 7 jarkko.sakkinen 2015-06-08 17:07:06 UTC
Sorry to bother you again with this but could you do acpidump -o acpitables.txt (full dump of all ACPI tables) and email the result to me. Thanks and sorry for the trouble (should have asked full dump at the first time).
Comment 8 mick.saunders+kernel 2015-06-09 05:31:28 UTC
I have e-mailed you with the output. 
Thanks again for looking into this.
Comment 9 Michael Marley 2015-06-23 18:27:17 UTC
I am also seeing this on an Intel NUC5i5MYHE that also has an AMI BIOS.  Would it be helpful for me to send any debugging info from my system, or do you already have all you need?
Comment 10 jarkko.sakkinen 2015-06-24 13:58:39 UTC
(In reply to Michael Marley from comment #9)
> I am also seeing this on an Intel NUC5i5MYHE that also has an AMI BIOS. 
> Would it be helpful for me to send any debugging info from my system, or do
> you already have all you need?

Can you email it to me? I'll check that it's the same issue that physical address is zero. As a short term quick fix the driver should return error code when the address is zero (so that it doesn't try to ioremap zero) and driver fails to initialize more gracefully...
Comment 11 Michael Marley 2015-06-24 14:08:08 UTC
I sent you an email.  Thanks!
Comment 12 Michael Marley 2015-06-24 14:45:54 UTC
I also tried reporting this issue to Intel hardware support, but they told me to bugger off because I am not running Microsoft® Windows®.  Jarkko, maybe since you work at Intel you would know the right people to contact?
Comment 13 jarkko.sakkinen 2015-06-25 07:26:42 UTC
Your AMI BIOS has the same bug (checked the dumps that you sent). The issue should be eventually fixed in the BIOS. Only AMI can help you with that.

I submitted a patch that fails gracefully when the contents are corrupted:

https://lkml.org/lkml/2015/6/24/386
Comment 14 Michael Marley 2015-06-25 09:06:46 UTC
Does that mean that the idea you had for a workaround previously won't work?
Comment 15 jarkko.sakkinen 2015-06-25 09:49:24 UTC
I've discussed about the approach but not yet sure whether it is the right thing to do a workaround.

On the other hand the patch that I sent is obvious bug fix because it prevents from using corrupted data inside the kernel. In short term that is sane thing to do. I'm not sure yet what is the long-term solution or should kernel report the error and leave it up to the BIOS vendor the fix the real bug (instead of masking the real bug).

/Jarkko
Comment 16 Michael Marley 2015-06-25 10:48:33 UTC
I definitely see that viewpoint, and I am going to see what I can do about contacting AMI today.  I expect, however, that they will just refer me to Intel hardware support, who has already indicated that they have no interest in fixing my problem because I am running Linux.
Comment 17 Michael Marley 2015-07-01 14:48:09 UTC
My attempts to contact AMI and Intel about this problem have failed.  I received no response from AMI and Intel either tells me to use Windows® or does not respond.
Comment 18 jarkko.sakkinen 2015-07-03 10:51:32 UTC
I'm waiting still feedback for my first patch. That's why this hasn't progressed.
Comment 19 Jethro Beekman 2015-07-07 21:38:10 UTC
Same issue also on Intel NUC5i5MYHE
Comment 20 Jethro Beekman 2015-07-07 22:24:26 UTC
The TPM 2.0 spec seems to suggest that the start method=6 value is not entirely bogus, see Table 8 in https://www.trustedcomputinggroup.org/files/static_page_files/648D7D46-1A4B-B294-D088037B8F73DAAF/TCG_ACPIGeneralSpecification_1-10_0-37-Published.pdf . 6 means "Reserved for the Memory mapped I/O Interface (TIS 1.2+Cancel)." Perhaps someone at AMI didn't quite understand the word reserved, but using 1.2 MMIO at 0xFED40000 seems to work. In particular, for the Intel NUC5i5MYHE on Linux 4.0 booting with tpm_crb.backlist=1 tpm_tis.force=1 results in a working TPM.
Comment 21 jarkko.sakkinen 2015-08-06 13:16:51 UTC
Thanks for the feedback. And sorry for the late reply. I was on a vacation for four weeks.

Jethro:

It looks that NUC5i5MYHE has a discrete TPM2 chip. The reason why TIS driver does not autodetect the chip is obvious. The device ID for that particular chip is missing from the device ID table inside the TIS driver. That is the reason why it works when you use the force parameter.

The CRB driver does not have a module parameter called backlist. Where does that come from?

Do you also get initialization error from CRB driver?
Comment 22 Jethro Beekman 2015-08-06 16:34:31 UTC
> The CRB driver does not have a module parameter called backlist. Where does
> that come from?

Sorry that was a complete typo on my end. Of course I meant:
modprobe.blacklist=tpm_crb tpm_tis.force=1

> Do you also get initialization error from CRB driver?

I don't quite remember and am unable to test it now. I can get back to you later with a full dmesg output.
Comment 23 jarkko.sakkinen 2015-08-07 11:02:44 UTC
(In reply to Jethro Beekman from comment #22)
> > The CRB driver does not have a module parameter called backlist. Where does
> > that come from?
> 
> Sorry that was a complete typo on my end. Of course I meant:
> modprobe.blacklist=tpm_crb tpm_tis.force=1

I think what happens here is follows (you should verify this from BIOS settings):

- dTPM 2.0 chip is enabled (that's why tpm_tis initializes when you use 'force'), PTT is disabled
- For some reason the BIOS still exposes ACPI object for PTT.

So it's a bug the ACPI tables. The reason why you have to use 'force' is that there is no device ID in tpm_tis driver for your chip.

This patch makes the CRB fail cleanly in this situation:

https://lkml.org/lkml/2015/6/24/386

It's already pulled to mainline and stable kernels.

The second patch to make the dTPM 2.0 chip init correctly would be to put the device ID to tpm_tis driver. 

Could you run acpidump with the machine and send me the file to my email? I'm then able to  fix the tpm_tis driver.
 
> > Do you also get initialization error from CRB driver?
> 
> I don't quite remember and am unable to test it now. I can get back to you
> later with a full dmesg output.

I think I don't need it at this point. I have fairly good picture already what is happening here. ACPI dump should be enough. After fix for CRB driver and tpm_tis, CRB will report one line error on boot but will fail cleanly and tpm_tis should initialize itself automatically without need for the 'force' parameter.

/Jarkko
Comment 24 jarkko.sakkinen 2015-08-11 11:50:25 UTC
This the part that I cannot comprehend really:

        Method (_HID, 0, NotSerialized)  // _HID: Hardware ID
        {
            If (TCMF)
            {
                Return (0x01013469)
            }
            Else
            {
                If ((TTDP == Zero))
                {
                    Return (0x310CD041)
                }
                Else
                {
                    Return ("MSFT0101")
                }
            }
        }

Usually HIDs are readable strings. With my limited ACPI knowledge the device object for TPM looks weird but it might be also because I'm not really an ACPI expert!

Anyway, I think that the BIOS has a bug that it ends up returning wrong HID for the dTPM. We can deduce this from the fact that tpm_crb is tried to initialize automatically. Again, I'm assuming here that HID can map to only for one device and one device only.

The workaround that fix the issue? It's too folded solution:

- In CRB driver check the start method. If it's 6, fail with error code 0.
- In FIFO driver add MSFT0101 to the list of HIDs. If start method is not 6, fail with error code 0.

I think in the FIFO case it's safe to use 0xFED40000 as the address if start method is 6. Have to see what code reviewers think about this once I send my bug fix to LKML.
Comment 25 jarkko.sakkinen 2015-08-12 07:54:29 UTC
I got answer form one TCG guy. Yes. Regardless the device is FIFO or CRB based TPM 2.0 device it always identifies itself as MSFT0101. So the fix that I proposed is absolutely the right thing to do.
Comment 26 Michael Marley 2015-08-19 02:02:34 UTC
When I try the tpm_tis.force=1 kernel argument on my NUC5i5MYHE, the TPM works but tpm_tis allocates every interrupt from 1 to 15, which clobbers (at least) the serial port driver and makes the serial port not work.  I tried tpm_tis.force=1,interrupts=0 but that makes no difference.
Comment 27 jarkko.sakkinen 2015-08-19 04:18:31 UTC
I'm still trying to acquire the hardware to test this. That's why things are lagging. Sorry.
Comment 28 jarkko.sakkinen 2015-08-29 16:14:58 UTC
FYI https://lkml.org/lkml/2015/8/29/102. Testing this would help. No guarantees that it will work though because I haven't tested it myself (will probably in next week if I receive NUC5i5MYHE).
Comment 29 Jethro Beekman 2015-09-03 21:38:54 UTC
The patch doesn't work for me. tpm_tis.force still works. There is no useful debugging information in dmesg.
Comment 30 jarkko.sakkinen 2015-09-04 16:18:08 UTC
I'm still waiting for the NUC to be delivered. Not much I can do until I get it.
Comment 31 jarkko.sakkinen 2015-09-04 16:23:11 UTC
The patch that I did before. I only checked that it compiles. It's not production quality so regressions are expected :) I made it available only because getting the environment has taken so long.
Comment 32 jarkko.sakkinen 2015-09-29 11:44:18 UTC
Almost finalized fixes for the dTPM (two patches): 

https://github.com/jsakkine/linux-tpm2/tree/tis-acpi-fix

Still testing and adjusting since the code changes are quite big so that I don't break anything.
Comment 33 Michael Marley 2015-09-30 15:13:40 UTC
I can confirm that this works correctly for me, thanks!
Comment 34 jarkko.sakkinen 2015-10-27 08:02:38 UTC
This can be closed down once v4.4-rc1 becomes available.
Comment 35 jarkko.sakkinen 2015-11-25 10:30:24 UTC
Fixes will land to v4.4. This *was not* a BIOS bug but a bug in detection of the TPM device in tpm_tis.
Comment 36 Jethro Beekman 2016-01-29 23:05:29 UTC
Mark as RESOLVED?
Comment 37 jarkko.sakkinen 2016-01-29 23:10:25 UTC
I don't seem to have authority to do that.
Comment 38 Yuval Adam 2016-02-11 10:58:54 UTC
Still seeing this bug on 4.4.1 (Arch Linux)

$ uname -a
Linux hostname 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016 x86_64 GNU/Linux

$ dmesg
[   15.732458] ------------[ cut here ]------------
[   15.732463] WARNING: CPU: 3 PID: 389 at arch/x86/mm/ioremap.c:198 __ioremap_caller+0x234/0x390()
[   15.732464] Info: mapping multiple BARs. Your kernel is fine.
[   15.732465] Modules linked in:
[   15.732467]  tpm_crb(+) industrialio fjes acpi_pad pcc_cpufreq(-) acpi_cpufreq(-) tpm_tis tpm evdev processor mac_hid sch_fq_codel ip_tables x_tables sha256_ssse3 sha256_generic hmac drbg ansi_cprng algif_skcipher af_alg hid_generic hid_logitech_hidpp hid_logitech_dj usbhid hid crct10dif_pclmul crc32_pclmul crc32c_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd nvme ahci sdhci_pci libahci sdhci led_class xhci_pci libata xhci_hcd mmc_core scsi_mod usbcore usb_common i915 video button intel_gtt i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm aes_x86_64 dm_crypt dm_mod ext4 crc16 mbcache jbd2
[   15.734562] CPU: 3 PID: 389 Comm: systemd-udevd Tainted: G     U          4.4.1-2-ARCH #1
[   15.734564] Hardware name:                  /NUC6i5SYB, BIOS SYSKLi35.86A.0028.2015.1112.1822 11/12/2015
[   15.734566]  0000000000000000 0000000078e33dfa ffff88045ca279a0 ffffffff812c7f39
[   15.734569]  ffff88045ca279e8 ffff88045ca279d8 ffffffff810765b2 00000000fed40040
[   15.734572]  ffffc90001940040 0000000000001000 0000000000000040 ffff88045beab280
[   15.734574] Call Trace:
[   15.734580]  [<ffffffff812c7f39>] dump_stack+0x4b/0x72
[   15.734584]  [<ffffffff810765b2>] warn_slowpath_common+0x82/0xc0
[   15.734587]  [<ffffffff8107664c>] warn_slowpath_fmt+0x5c/0x80
[   15.734589]  [<ffffffff8107cc27>] ? iomem_map_sanity_check+0x97/0xd0
[   15.734593]  [<ffffffff81064a84>] __ioremap_caller+0x234/0x390
[   15.734595]  [<ffffffff81064bf7>] ioremap_nocache+0x17/0x20
[   15.734610]  [<ffffffff812e0a82>] devm_ioremap_nocache+0x42/0x80
[   15.734615]  [<ffffffffa051c238>] crb_acpi_add+0x108/0x2d0 [tpm_crb]
[   15.734618]  [<ffffffff8134b6b4>] acpi_device_probe+0x4f/0xf5
[   15.734621]  [<ffffffff813eb652>] driver_probe_device+0x222/0x4a0
[   15.734623]  [<ffffffff813eb954>] __driver_attach+0x84/0x90
[   15.734625]  [<ffffffff813eb8d0>] ? driver_probe_device+0x4a0/0x4a0
[   15.734628]  [<ffffffff813e928c>] bus_for_each_dev+0x6c/0xc0
[   15.734631]  [<ffffffff813eae0e>] driver_attach+0x1e/0x20
[   15.734633]  [<ffffffff813ea95b>] bus_add_driver+0x1eb/0x280
[   15.734635]  [<ffffffffa0521000>] ? 0xffffffffa0521000
[   15.734637]  [<ffffffff813ec260>] driver_register+0x60/0xe0
[   15.734639]  [<ffffffff8134b583>] acpi_bus_register_driver+0x3b/0x43
[   15.734643]  [<ffffffffa0521010>] crb_acpi_driver_init+0x10/0x1000 [tpm_crb]
[   15.734645]  [<ffffffff81002123>] do_one_initcall+0xb3/0x200
[   15.734649]  [<ffffffff811619d7>] do_init_module+0x5f/0x1e8
[   15.734652]  [<ffffffff810fbf7f>] load_module+0x219f/0x27e0
[   15.734654]  [<ffffffff810f8e70>] ? symbol_put_addr+0x50/0x50
[   15.734658]  [<ffffffff810fc70e>] SyS_init_module+0x14e/0x190
[   15.734662]  [<ffffffff81591b2e>] entry_SYSCALL_64_fastpath+0x12/0x71
[   15.734664] ---[ end trace ca977c5b5ff297f5 ]---
Comment 39 jarkko.sakkinen 2016-02-11 11:19:05 UTC
(In reply to Yuval Adam from comment #38)
> Still seeing this bug on 4.4.1 (Arch Linux)

You are seeing a different regression (not this one)

https://bugzilla.kernel.org/show_bug.cgi?id=111511
Comment 40 Yuval Adam 2016-02-11 12:05:25 UTC
Thanks for the pointer Jarkko!
Comment 41 jarkko.sakkinen 2016-08-22 13:57:55 UTC
399235dc6e954