TPM on IBM thinkcenter S51
Hi,
I can't make TPM work on an IBM thinkcenter S51
running 2.6.12-rc5 kernel. Here is what I did:
1. build the drivers tpm.ko and tpm_nsc.ko and
modprobe tpm
2. create /dev/tpm
3. build tpm libtcpa (version 1.1)
4. run tcpa_demo
then I got an error "Can't open TPM driver".
I also tried tpm_amtel (though I believe mine is nsc) and the same error too.
Does anybody experience the same problem and have a clue?
thanks,
Gavin,
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
Quoted 10 lines · trusted linux
I can't make TPM work on an IBM thinkcenter S51
running 2.6.12-rc5 kernel. Here is what I did:1. build the drivers tpm.ko and tpm_nsc.ko and
modprobe tpm
2. create/dev/tpm
3. build tpm libtcpa (version 1.1)
4. runtcpa_demothen I got an error "Can't open TPM driver".
I'd check with strace first what's going on there. In my case I had /dev/tpm0 created by udev with libtcpa accessing /dev/tpm. So - what's the output of
strace ./tcpa_demo
??
Greetings
Torsten
Torsten,
thanks, here is my strace related to tpm:
open("/dev/tpm", O_RDWR) = -1 ENODEV
(No such device)
write(2, "Can\'t open TPM Driver\n", 22Can't open TPM Driver
) = 22
I also inserted some printk in tpm.c and tpm_nsc.c (tpm_atmel.c as well). I only saw "init_tpm" be called. "tpm_open" was not even called!
This machine (IBM thinkcenter S51) has a TPM (confirmed by IBM support and its own specs). So, the only possible problem is the driver. Any idea?
thanks a lot,
Gang
--- Torsten Landschoff
Quoted 20 lines · <[email protected]> wrote:
Quoted 10 lines · trusted linux
I can't make TPM work on an IBM thinkcenter S51
running 2.6.12-rc5 kernel. Here is what I did:1. build the drivers tpm.ko and tpm_nsc.ko and
modprobe tpm
2. create/dev/tpm
3. build tpm libtcpa (version 1.1)
4. runtcpa_demothen I got an error "Can't open TPM driver".
I'd check with strace first what's going on there. In my case I
had/dev/tpm0created by udev with libtcpa accessing/dev/tpm. So -
what's the output of
Quoted 9 lines
strace ./tcpa_demo
??
Greetings
Torsten
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html
Quoted 7 lines · trusted linux
thanks, here is my strace related to tpm:
open("/dev/tpm", O_RDWR)= -1 ENODEV
(No such device)
write(2, "Can\'t open TPM Driver\n", 22Can't open TPM Driver
) = 22
Okay, so the driver is in fact not working. It could be that /dev/tpm has the wrong device number assigned. If the driver is really installed can be checked by
systool -c misc|grep tpm
I bet it does not show anything. OTOH if the module loads successfully it really should be there. No idea what's going wrong then.
Which version of the driver are you using?
Greetings
Torsten
Hi Torsten,
I maintain the driver and am interested in figuring out what this problem is. Can you please tell me what the device major/minor are on /dev/tpm. Any output produced by the driver in /var/log/messages. Also the output of /sbin/lspci. Also I am assuming you are using the version in the default 2.6.12-rc5. There are many changes are in the - mm2 patch so I will pull down the default tree and make sure the version there is working.
Thanks,
Kylie
Quoted 31 lines · Torsten Landschoff
Quoted 7 lines · trusted linux
thanks, here is my strace related to tpm:
open("/dev/tpm", O_RDWR)= -1 ENODEV
(No such device)
write(2, "Can\'t open TPM Driver\n", 22Can't open TPM Driver
) = 22Okay, so the driver is in fact not working. It could be that
/dev/tpmhas the wrong device number assigned. If the driver is really installed can be checked bysystool -c misc|grep tpm
I bet it does not show anything. OTOH if the module loads successfully it really should be there. No idea what's going wrong then.
Which version of the driver are you using?
Greetings
Torsten
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Ok,
I think this patch will fix the driver to find your TPM. It is just adding some additional LPC buses to look for so it won't make things any worse if it doesn't fix the problem. Please let me know if it works. If it finds the device it should print a version message in syslog. Also there should be a tpm0 directory in /sys/classs/misc. Once you have that you can try to cat /sys/class/misc/tpm0/device/pcrs. If that returns an error please try the next patch I send you and let me know the results.
Thanks,
Kylie
drivers/char/tpm/tpm_nsc.c renamed from drivers/char/tpm/tpm_nsc.c.orig +3 -0
@@ -340,6 +340,9 @@ static struct pci_device_id tpm_pci_tbl[ {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12)}, {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0)}, {PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_LPC)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1)}, + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0)}, {0,} };
Quoted 53 lines · Kylene Jo Hall
Hi Torsten,
I maintain the driver and am interested in figuring out what this problem is. Can you please tell me what the device major/minor are on
/dev/tpm. Any output produced by the driver in/var/log/messages. Also the output of/sbin/lspci. Also I am assuming you are using the version in the default 2.6.12-rc5. There are many changes are in the - mm2 patch so I will pull down the default tree and make sure the version there is working.Thanks,
KylieQuoted 22 lines · Torsten Landschoff
Quoted 7 lines · trusted linux
thanks, here is my strace related to tpm:
open("/dev/tpm", O_RDWR)= -1 ENODEV
(No such device)
write(2, "Can\'t open TPM Driver\n", 22Can't open TPM Driver
) = 22Okay, so the driver is in fact not working. It could be that
/dev/tpmhas the wrong device number assigned. If the driver is really installed can be checked bysystool -c misc|grep tpm
I bet it does not show anything. OTOH if the module loads successfully it really should be there. No idea what's going wrong then.
Which version of the driver are you using?
Greetings
Quoted 9 lines
Torsten
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Kylene and Torsten,
thanks for the help. sorry for the late response - my machine crashed (for other reasons) and I had to rebuild it.
0. I am using 2.6.12-rc5 default driver.
1. systool -c misc|grep tpm shows nothing. the driver is not there.
2. here is ll /dev/tpm output: (major 10, minor 224).
crw-r--r-- 1 root root 10, 224 Jun 9 20:11 /dev/tpm
3. when I modprobe tpm and tpm_nsc (or insmod), no output is printed to /var/log/messages except my own test message.
4. /sbin/lspci output:
00:00.0 Host bridge: Intel Corp. 915G/P/GV Processor to I/O Controller (rev 04)
00:02.0 VGA compatible controller: Intel Corp. 82915G Express Chipset Family Graphics Controller (rev 04) 00:1d.0 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family ) USB UHCI #1 (rev
03)
00:1d.1 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family ) USB UHCI #2 (rev
03)
00:1d.2 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family ) USB UHCI #3 (rev
03)
00:1d.3 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family ) USB UHCI #4 (rev
03)
00:1d.7 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family ) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev d3)
00:1e.2 Multimedia audio controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
00:1f.0 ISA bridge: Intel Corp. 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03) 00:1f.2 IDE interface: Intel Corp. 82801FB/FW (ICH6/ICH6W) SATA Contro ller (rev 03) 00:1f.3 SMBus: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus C ontroller (rev 03)
0a:0b.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5705_2 Gigabit Ethernet (rev 03)
5. I tried the Kylene's 1st patch. I first got an
error
patching file as the following:
linux-2.6.12-rc5/drivers/char/tpm/tpm_nsc.c
patch: **** malformed patch at line 13: };
then I modified the patch:
--- linux-2.6.12-rc5/drivers/char/tpm/tpm_nsc_orig.c
2005-06-09 21:07:49.000000000 -0400 +++ linux-2.6.12-rc5/drivers/char/tpm/tpm_nsc.c 2005-06-09 21:18:30.000000000 -0400
@@ -340,6 +340,9 @@
{PCI_DEVICE(PCI_VENDOR_ID_INTEL,PCI_DEVICE_ID_INTEL_82801DB_12)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL,PCI_DEVICE_ID_INTEL_82801EB_0)},
{PCI_DEVICE(PCI_VENDOR_ID_AMD,PCI_DEVICE_ID_AMD_8111_LPC)},
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL,PCI_DEVICE_ID_INTEL_ICH6_0)},
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL,PCI_DEVICE_ID_INTEL_ICH6_1)},
+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL,PCI_DEVICE_ID_INTEL_ICH7_0)},
{0,}};
And patching works but tpm still doesn't work - tpm0 directory is not created under /sys/class.
6. I checked tpmdd but the lastest version is for
2.6.11. I guess 2.6.12 should supercede it.
any idea?
thanks,
Gang
Quoted 110 lines · --- Kylene Jo Hall
Ok,
I think this patch will fix the driver to find your TPM. It is just
adding some additional LPC buses to look for so it won't make things any
worse if it doesn't fix the problem. Please let me know if it works.
If it finds the device it should print a version message in syslog.
Also there should be a tpm0 directory in/sys/classs/misc. Once you
have that you can try to cat/sys/class/misc/tpm0/device/pcrs. If that returns an error please try the next patch I send you and let me know
the results.Thanks,
KylieSigned-off-by Kylene Hall <[email protected]>--- linux-2.6.12-rc5/drivers/char/tpm/tpm_nsc.c.orig
2005-06-03 11:14:07.000000000 -0500 +++ linux-2.6.12-rc5/drivers/char/tpm/tpm_nsc.c 2005-06-03 11:14:53.000000000 -0500(quoted diff) +0
-0@@ -340,6 +340,9 @@ static struct pci_device_idtpm_pci_tbl[
{PCI_DEVICE(PCI_VENDOR_ID_INTEL,PCI_DEVICE_ID_INTEL_82801DB_12)},
{PCI_DEVICE(PCI_VENDOR_ID_INTEL,PCI_DEVICE_ID_INTEL_82801EB_0)},
{PCI_DEVICE(PCI_VENDOR_ID_AMD,PCI_DEVICE_ID_AMD_8111_LPC)},(quoted diff) +1
-0+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_ICH6_0)},(quoted diff) +1
-0+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_ICH6_1)},(quoted diff) +1
-0+ {PCI_DEVICE(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_ICH7_0)},
{0,}
};Quoted 3 lines · Kylene Jo Hall
Hi Torsten,
I maintain the driver and am interested in
figuring out what this
Quoted 1 line
problem is. Can you please tell me what the
device major/minor are
Quoted 1 line
on
/dev/tpm. Any output produced by the driver in
/var/log/messages.Quoted 1 line
Also the output of
/sbin/lspci. Also I amassuming you are using the
Quoted 1 line
version in the default 2.6.12-rc5. There are many
changes are in the -
Quoted 1 line
mm2 patch so I will pull down the default tree and
make sure the version
Quoted 6 lines
there is working.
Thanks,
KylieOn Fri, 2005-06-03 at 11:23 +0200, Torsten
Quoted 1 line · Landschoff
Quoted 1 line
On Thu, 2005-06-02 at 15:00 -0700, trusted linux
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
thanks, here is my strace related to tpm:
open("/dev/tpm", O_RDWR)= -1ENODEV
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
(No such device)
write(2, "Can\'t open TPM Driver\n", 22Can'topen TPM
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Driver
) = 22Okay, so the driver is in fact not working. It
could be that
/dev/tpmQuoted 1 line
Quoted 1 line
has the wrong device number assigned. If the
driver is really installed
Quoted 5 lines
Quoted 5 lines
can be checked by
systool -c misc|grep tpm
I bet it does not show anything. OTOH if the
module loads successfully
Quoted 1 line
Quoted 1 line
it really should be there. No idea what's going
wrong then.
Quoted 9 lines
Quoted 9 lines
Which version of the driver are you using?
Greetings
Torsten
-
To unsubscribe from this list: send the line"unsubscribe linux-kernel" in
Quoted 1 line
Quoted 1 line
the body of a message to
Quoted 1 line
Quoted 1 line
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Quoted 4 lines
Quoted 3 lines
Please read the FAQ at http://www.tux.org/lkml/
Quoted 11 lines
Quoted 2 lines
-
To unsubscribe from this list: send the line"unsubscribe linux-kernel" in
Quoted 2 lines
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
Quoted 3 lines
Please read the FAQ at http://www.tux.org/lkml/
__________________________________
Discover Yahoo!
Have fun online with music videos, cool games, IM and more. Check it out!
http://discover.yahoo.com/online.html
The second patch that may be necessary to fix the NSC TPM command path. Please let me know your results.
Thanks,
Kylie
---
drivers/char/tpm/tpm_nsc.c renamed from drivers/char/tpm/tpm_nsc.orig +2 -2
@@ -149,7 +149,7 @@ static int tpm_nsc_recv(struct tpm_chipbreak ; *p =inb (chip->vendor->base +NSC_DATA ); } - +/* if ((data & NSC_STATUS_F0) == 0) { dev_err(&chip->pci_dev->dev, "F0 not set\n"); return -EIO;
@@ -159,7 +159,7 @@ static int tpm_nsc_recv(struct tpm_chip"expected end of command(0x%x)\n", data); return -EIO; } - +*/ native_size = (__force __be32 *) (buf +2 ); size =be32_to_cpu (*native_size);
Quoted 53 lines · Kylene Jo Hall
Hi Torsten,
I maintain the driver and am interested in figuring out what this problem is. Can you please tell me what the device major/minor are on
/dev/tpm. Any output produced by the driver in/var/log/messages. Also the output of/sbin/lspci. Also I am assuming you are using the version in the default 2.6.12-rc5. There are many changes are in the - mm2 patch so I will pull down the default tree and make sure the version there is working.Thanks,
KylieQuoted 22 lines · Torsten Landschoff
Quoted 7 lines · trusted linux
thanks, here is my strace related to tpm:
open("/dev/tpm", O_RDWR)= -1 ENODEV
(No such device)
write(2, "Can\'t open TPM Driver\n", 22Can't open TPM Driver
) = 22Okay, so the driver is in fact not working. It could be that
/dev/tpmhas the wrong device number assigned. If the driver is really installed can be checked bysystool -c misc|grep tpm
I bet it does not show anything. OTOH if the module loads successfully it really should be there. No idea what's going wrong then.
Which version of the driver are you using?
Greetings
Quoted 9 lines
Torsten
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hi Kylene,
Quoted 2 lines · Kylene Jo Hall
I maintain the driver and am interested in figuring out what this problem is. Can you please tell me what the device major/minor are
I think this is a misunderstanding. My TPM is working just fine but the guy I was replying to seems to have some problems.
The old tpm driver (version 2.0) distributed seperately at
http://www.research.ibm.com/gsal/tcpa/TPM-2.0.tar.gz
did not work for me though. I did not find an obvious problem in it but noticed there is the tpmdd project on SourceForge and got the driver from there. That driver is working just fine for me.
Quoted 3 lines
version in the default 2.6.12-rc5. There are many changes are in the - mm2 patch so I will pull down the default tree and make sure the version there is working.
Still trying to get a grip on git to track the latest kernel and test the TPM driver in there. Anyway, the driver I have is working fine. :) (I am working with an IBM ThinkPad R51 if you care about it).
Greetings
Torsten