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 126.96.36.199 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 188.8.131.52
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:
author: Leendert van Doorn (email@example.com)
description: TPM Driver, version 2.0
vermagic: 2.6.9 preempt PENTIUMM gcc-3.3