[Bug]tpm initialization fails on x86

Bug #1596469 reported by yunyings on 2016-06-27
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
intel
Undecided
Unassigned
linux (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Tim Gardner

Bug Description

When trying to test TPM with Ubuntu 16.04 on Intel x86_64 platform, there's tpm initialization failure found in kernel log:
root@SKLU1-leg:~# dmesg | grep -i tpm
[ 0.000000] ACPI: SSDT 0x000000007FFE4000 0004D6 (v02 Intel_ Tpm2Tabl 00001000 INTL 20141107)
[ 0.000000] ACPI: TPM2 0x000000007FFE2000 000034 (v03 00000000 00000000)
[ 2.532245] ima: No TPM chip found, activating TPM-bypass!
[ 3.489431] tpm_crb MSFT0101:00: can't request region for resource [mem 0xfed40040-0xfed4103f]
[ 3.489437] tpm_crb: probe of MSFT0101:00 failed with error -16

which leads to tpm device missing under /dev:
root@SKLU1-leg:~# ls -l /dev/tpm*
ls: cannot access '/dev/tpm*': No such file or directory

This error has been fixed with patch below, but not yet merged to upstream kernel:
http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/0af6e0a2da2e4fedaa2743333da438d3b879192b

Patch 0af6e0a has dependency to this patch:
http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/3f944075e75e28c9cf1af8f82798398b
So 0af6e0a has to be applied upon 3f94407, otherwise patch apply fails.

I've verified with kernel 4.7-rc4 that above 2 patches can fix this TPM issue.
So please Ubuntu team help on backporting these 2 patches into the kernel of their next release.

PS, below are some information about Ubuntu & kernel & cpu info on my test server, for your reference:
root@SKLU1-leg:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
root@SKLU1-leg:~# uname -a
Linux SKLU1-leg 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

affects: neutron → intel
summary: - tpm initialization fails on x86
+ [Bug]tpm initialization fails on x86
Tim Gardner (timg-tpi) on 2016-06-27
Changed in linux (Ubuntu Xenial):
assignee: nobody → Tim Gardner (timg-tpi)
status: New → In Progress

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1596469

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Tim Gardner (timg-tpi) wrote :

Yakkety will pick this up naturally in v4.8

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Changed in linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Kamal Mostafa (kamalmostafa) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
yunyings (yunying-sun) wrote :

Retested with xenial-proposed kernel, original TPM error is gone

test@SKLU1-leg:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial

test@SKLU1-leg:~$ uname -r
4.4.0-29-generic

test@SKLU1-leg:~$ dmesg | grep -i tpm
[ 0.000000] ACPI: SSDT 0x000000007FFE4000 0004D6 (v02 Intel_ Tpm2Tabl 00001000 INTL 20141107)
[ 0.000000] ACPI: TPM2 0x000000007FFE2000 000034 (v03 00000000 00000000)
[ 2.504384] ima: No TPM chip found, activating TPM-bypass!

test@SKLU1-leg:~$ ls -l /dev/tpm0
crw------- 1 root root 10, 224 6月 30 11:23 /dev/tpm0

tags: added: verification-done-xenial
removed: verification-needed-xenial
Launchpad Janitor (janitor) wrote :
Download full text (6.1 KiB)

This bug was fixed in the package linux - 4.4.0-31.50

---------------
linux (4.4.0-31.50) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1602449

  * nouveau: boot hangs at blank screen with unsupported graphics cards
    (LP: #1602340)
    - SAUCE: drm: check for supported chipset before booting fbdev off the hw

linux (4.4.0-30.49) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1597897

  * FCP devices are not detected correctly nor deterministically (LP: #1567602)
    - scsi_dh_alua: Disable ALUA handling for non-disk devices
    - scsi_dh_alua: Use vpd_pg83 information
    - scsi_dh_alua: improved logging
    - scsi_dh_alua: sanitze sense code handling
    - scsi_dh_alua: use standard logging functions
    - scsi_dh_alua: return standard SCSI return codes in submit_rtpg
    - scsi_dh_alua: fixup description of stpg_endio()
    - scsi_dh_alua: use flag for RTPG extended header
    - scsi_dh_alua: use unaligned access macros
    - scsi_dh_alua: rework alua_check_tpgs() to return the tpgs mode
    - scsi_dh_alua: simplify sense code handling
    - scsi: Add scsi_vpd_lun_id()
    - scsi: Add scsi_vpd_tpg_id()
    - scsi_dh_alua: use scsi_vpd_tpg_id()
    - scsi_dh_alua: Remove stale variables
    - scsi_dh_alua: Pass buffer as function argument
    - scsi_dh_alua: separate out alua_stpg()
    - scsi_dh_alua: Make stpg synchronous
    - scsi_dh_alua: call alua_rtpg() if stpg fails
    - scsi_dh_alua: switch to scsi_execute_req_flags()
    - scsi_dh_alua: allocate RTPG buffer separately
    - scsi_dh_alua: Use separate alua_port_group structure
    - scsi_dh_alua: use unique device id
    - scsi_dh_alua: simplify alua_initialize()
    - revert commit a8e5a2d593cb ("[SCSI] scsi_dh_alua: ALUA handler attach should
      succeed while TPG is transitioning")
    - scsi_dh_alua: move optimize_stpg evaluation
    - scsi_dh_alua: remove 'rel_port' from alua_dh_data structure
    - scsi_dh_alua: Use workqueue for RTPG
    - scsi_dh_alua: Allow workqueue to run synchronously
    - scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'
    - scsi_dh_alua: Recheck state on unit attention
    - scsi_dh_alua: update all port states
    - scsi_dh_alua: Send TEST UNIT READY to poll for transitioning
    - scsi_dh_alua: do not fail for unknown VPD identification

linux (4.4.0-29.48) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1597015

  * Wireless hotkey fails on Dell XPS 15 9550 (LP: #1589886)
    - intel-hid: new hid event driver for hotkeys
    - intel-hid: fix incorrect entries in intel_hid_keymap
    - intel-hid: allocate correct amount of memory for private struct
    - intel-hid: add a workaround to ignore an event after waking up from S4.
    - [Config] CONFIG_INTEL_HID_EVENT=m

  * cgroupfs mounts can hang (LP: #1588056)
    - Revert "UBUNTU: SAUCE: (namespace) mqueue: Super blocks must be owned by the
      user ns which owns the ipc ns"
    - Revert "UBUNTU: SAUCE: kernfs: Do not match superblock in another user
      namespace when mounting"
    - Revert "UBUNTU: SAUCE: cgroup: Use a new super block when mounting in a
      cgroup namespace"
    - (name...

Read more...

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in intel:
status: New → Fix Released
Alpha (alpha1z) wrote :

I'm running Ubuntu 16.04.2 with kernel 4.8.0-41-generic on ASUS ux330ua (Skylake i7-6500). The problem is still there. So the fix doesn't seem to be included in kernel 4.8.*

dmesg | grep -i tpm

[ 0.000000] ACPI: TPM2 0x00000000768603A8 000034 (v03 Tpm2Tabl 00000001 AMI 00000000)
[ 0.923374] ima: No TPM chip found, activating TPM-bypass!
[ 2.339243] tpm_crb MSFT0101:00: can't request region for resource [mem 0xfed40080-0xfed40fff]
[ 2.339251] tpm_crb: probe of MSFT0101:00 failed with error -16

Tomas Winkler (tomas-winkler) wrote :

This is a BIOS issue can you please attach dmidecode of your platform, I'd like to know more detailed platform and bios information.
Also please add the while dmesg and cat /proc/iomem
Thanks

Tim Gardner (timg-tpi) wrote :

alpha1z: Please start a new bug as I think you have a different issue then the original bug report.

quanxian (quanxian-wang) wrote :
Tomas Winkler (tomas-winkler) wrote :

NUK SKL-H BIOS version 0045 and later should fix this issue.
https://downloadcenter.intel.com/download/26698/NUCs-BIOS-Update-KYSKLi70-86A-

Thanks
Tomas

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers