* Re: [tpm2] SPI TPM and SPI flash can not work at the same time
@ 2018-11-14 4:28 Sherry Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Sherry Zhang @ 2018-11-14 4:28 UTC (permalink / raw)
To: tpm2
[-- Attachment #1: Type: text/plain, Size: 3602 bytes --]
First of all, thank you!!!
Like:
tpm2_getcap -c properties-fixed
tpm2_getcap -c commands
These commands can not work well.
I do more experiments and find that tpm driver can not work well, but I do not know the reason :
spi port0/1: flash port2: TPM2.0
driver modules: tpm_tis.ko(tpm driiver) spi-zx.ko(spi controller driver) m25p80.ko(flash driver)
(1) When I boot with ubuntu16.04 of the kernel-4.16.2 , I find that the os only modprobe tpm_tis.ko and spi-zx.ko without m25p80.ko.
So I can see /dev/tpm0,but /dev/mtd0 and /dev/mtd1.
(2) If I do not modprobe m25p80, then /dev/tpm0 works well.
(3) Then I modprobe m25p80,and I test /dev/mtd1. It seems normal.
Then I rmmod spi_zx and m25p80 driver. It seems normal.
But when I rmmod tpm_tis,it shows:
Tpm tpm0: A TPM error (151) occurred stopping the TPM
(4)boot os
rmmod tpm_tis ----- normal
modprobe m25p80 -----normal
./spi_flash /dev/mtd1 --- normal
rmmod m25p80 -----normal
modprobe tpm_tis ------error
tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x101, rev-id 0)
tpm tpm0:A TPM error(151) occurred continue selftest
tpm tpm0: TPM self test failed
Best regards,
Sherry Zhang
>
> I wish I could help you more, but your TPM isn't returning a valid RC.
>
> Since bit 7 is set in 0x97, this indicates that it is a FMT 1 response code.
>
> Fmt 1 response codes have the handle encoded in bit positions 8-11
> inclusive.
> And is 1-based per
> https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-
> 2-Structures-01.38.pdf
> Section 6.6.
>
> It seems the error bits 0-5 inclusive are 0x17 which is TPM2_RC_TAG.
>
> Which is "a parameter that should be a structure tag has a value that is not
> supported by the TPM"
>
> I'm not sure why this is failing on your TPM, do any other tpm2_getcap
> commands work?
>
> Like:
> tpm2_getcap -c properties-fixed
> tpm2_getcap -c commands
>
> Bill
>
> > -----Original Message-----
> > From: tpm2 [mailto:tpm2-bounces(a)lists.01.org] On Behalf Of Sherry
> > Zhang(BJ-
> > RD)
> > Sent: Monday, November 5, 2018 8:14 PM
> > To: tpm2(a)lists.01.org
> > Subject: [tpm2] SPI TPM and SPI flash can not work at the same time
> >
> > Hi All,
> >
> > Ubuntu16.04 with the kernel 4.16.2:
> >
> > I use a spi port2 with a FIFO TPM2.0 and two flash on the spi port 0/1.
> >
> > First, I unload drivers of spi controller and test the TPM2.0
> > (built-in tpm_tis.o)
> >
> > #tpm2_abrmd �tcti=”device:/dev/tpm0” �allow-root &
> >
> > #tpm2_pcrlist
> >
> > #tpm2_nvlist
> >
> > And I can use tpm2-tools to test and it is normal .
> >
> >
> >
> > Then I load spi controller driver, and test /dev/mtd0 at spi port0
> > that can work well.
> >
> > But when I run the commad “tpm2_nvlist” , it shows a error.
> >
> > #tpm2_nvlist
> >
> > ERROR: Tss2_Sys_GetCapability(0x97) �tpm: handle(unk): incorrect
> > structure tag
> >
> > ERROR: Unable to run tpm2_nvlist
> >
> >
> >
> > PS:
> >
> > tpm2-tss 2.1.0
> >
> > Tpm2-abrmd 2.0.3_rc0
> >
> > Tpm2-tools 3.0.2
> >
> >
> >
> > Best regards,
> >
> > Sherry Zhang
> >
> >
保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tpm2] SPI TPM and SPI flash can not work at the same time
@ 2018-11-13 16:43 Roberts, William C
0 siblings, 0 replies; 3+ messages in thread
From: Roberts, William C @ 2018-11-13 16:43 UTC (permalink / raw)
To: tpm2
[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]
I wish I could help you more, but your TPM isn't returning a valid RC.
Since bit 7 is set in 0x97, this indicates that it is a FMT 1 response code.
Fmt 1 response codes have the handle encoded in bit positions 8-11 inclusive.
And is 1-based per https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-2-Structures-01.38.pdf
Section 6.6.
It seems the error bits 0-5 inclusive are 0x17 which is TPM2_RC_TAG.
Which is "a parameter that should be a structure tag has a value that is not supported by
the TPM"
I'm not sure why this is failing on your TPM, do any other tpm2_getcap commands work?
Like:
tpm2_getcap -c properties-fixed
tpm2_getcap -c commands
Bill
> -----Original Message-----
> From: tpm2 [mailto:tpm2-bounces(a)lists.01.org] On Behalf Of Sherry Zhang(BJ-
> RD)
> Sent: Monday, November 5, 2018 8:14 PM
> To: tpm2(a)lists.01.org
> Subject: [tpm2] SPI TPM and SPI flash can not work at the same time
>
> Hi All,
>
> Ubuntu16.04 with the kernel 4.16.2:
>
> I use a spi port2 with a FIFO TPM2.0 and two flash on the spi port 0/1.
>
> First, I unload drivers of spi controller and test the TPM2.0 (built-in tpm_tis.o)
>
> #tpm2_abrmd �tcti=”device:/dev/tpm0” �allow-root &
>
> #tpm2_pcrlist
>
> #tpm2_nvlist
>
> And I can use tpm2-tools to test and it is normal .
>
>
>
> Then I load spi controller driver, and test /dev/mtd0 at spi port0 that can work
> well.
>
> But when I run the commad “tpm2_nvlist” , it shows a error.
>
> #tpm2_nvlist
>
> ERROR: Tss2_Sys_GetCapability(0x97) �tpm: handle(unk): incorrect structure tag
>
> ERROR: Unable to run tpm2_nvlist
>
>
>
> PS:
>
> tpm2-tss 2.1.0
>
> Tpm2-abrmd 2.0.3_rc0
>
> Tpm2-tools 3.0.2
>
>
>
> Best regards,
>
> Sherry Zhang
>
>
>
>
>
> 保密声明:
> 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其
> 内容做任何未经授权的查阅、使用、复制或转发。
> CONFIDENTIAL NOTE:
> This email contains confidential or legally privileged information and is for the sole
> use of its intended recipient. Any unauthorized review, use, copying or
> forwarding of this email or the content of this email is strictly prohibited.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tpm2] SPI TPM and SPI flash can not work at the same time
@ 2018-11-06 4:13 Sherry Zhang
0 siblings, 0 replies; 3+ messages in thread
From: Sherry Zhang @ 2018-11-06 4:13 UTC (permalink / raw)
To: tpm2
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
Hi All,
Ubuntu16.04 with the kernel 4.16.2:
I use a spi port2 with a FIFO TPM2.0 and two flash on the spi port 0/1.
First, I unload drivers of spi controller and test the TPM2.0 (built-in tpm_tis.o)
#tpm2_abrmd -tcti="device:/dev/tpm0" -allow-root &
#tpm2_pcrlist
#tpm2_nvlist
And I can use tpm2-tools to test and it is normal .
Then I load spi controller driver, and test /dev/mtd0 at spi port0 that can work well.
But when I run the commad "tpm2_nvlist" , it shows a error.
#tpm2_nvlist
ERROR: Tss2_Sys_GetCapability(0x97) -tpm: handle(unk): incorrect structure tag
ERROR: Unable to run tpm2_nvlist
PS:
tpm2-tss 2.1.0
Tpm2-abrmd 2.0.3_rc0
Tpm2-tools 3.0.2
Best regards,
Sherry Zhang
?????
?????????????????????????????????????????????????????
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 5089 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-14 4:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 4:28 [tpm2] SPI TPM and SPI flash can not work at the same time Sherry Zhang
-- strict thread matches above, loose matches on Subject: below --
2018-11-13 16:43 Roberts, William C
2018-11-06 4:13 Sherry Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox