Atmel TPM on an IBM T42p

Update: kernel 2.6.12 includes the device driver already!

Today I got IBM’s v2.0 device driver for the TPM, written by Leendert van Doorn, to work with my IBM T42p laptop. This laptop includes an Atmel TPM chip. I’m not certain about the part number of this particular chip, but the driver reports version upon installation. I *think* that is the TPM chip version, and not the driver version (since it should be v2.0), but this stuff is all so new that I’m not certain about any of it.

IBM’s tarball contains two folders: libtpm, and tpm-2.0. libtpm is the library against which one can write programs. tpm-2.0 is the kernel module. I’m running Debian with a 2.6.9 kernel.

The kernel module has no installation script, so one must manually tell the kernel to load this module. For me, this entailed: creating the directory /lib/modules/2.6.9/misc, and copying the tpm.ko file to the new directory. I then edited /etc/modules and added “tpm” on its own line. Finally, I ran depmod -a to tell the kernel I added a new module.

Upon module installation, the following three lines are output to the syslog:

tpm: Atmel TPM version
tpm: StartUp failed
tpm: PhysicalPresence failed

As far as I can tell, things are working correctly. I don’t know what these error messages mean.

Upon building libtpm, a bunch of utilities are created. Among them, tpm_demo. When I first tried to run tpm_demo, I received an I/O error. After some googling, I realized that it is necessary to create /dev/tpm for things to work correctly. For this, I did “mknod /dev/tpm c 10 224” (without the quotes). I figured this out by looking at this page.

Most of the commands I mention in here have to be run as root. After doing the mknod, I suggest you reboot, just to be safe.

With everything up and running, modinfo tpm yields:

filename: /lib/modules/2.6.9/misc/tpm.ko
author: Leendert van Doorn (
description: TPM Driver, version 2.0
license: GPL
vermagic: 2.6.9 preempt PENTIUMM gcc-3.3
alias: pci:v00008086d00002440sv*sd*bc*sc*i*
alias: pci:v00008086d0000248Csv*sd*bc*sc*i*
alias: pci:v00008086d000024C0sv*sd*bc*sc*i*
alias: pci:v00008086d000024CCsv*sd*bc*sc*i*
alias: pci:v00008086d000024D0sv*sd*bc*sc*i*
alias: pci:v00001022d00007468sv*sd*bc*sc*i*

Good luck!


One thought on “Atmel TPM on an IBM T42p

  1. Try dmidecode

    I have rouhgly the same ‘ status’ . with that interface to the hardware I see the chips’ status ‘ = unknown’ whereas I think that should say ‘ status enabled’


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s