lkml.org 
[lkml]   [2014]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Re: [PATCH v10 0/8] TPM 2.0 support

On Tue, Dec 16, 2014 at 10:19:26PM +0100, Peter Huewe wrote:
> > So, what do you think? Are we now settled with this?
>
> Meh...
> It does not recognize my tpm20 with force=1 :( :( :(
> Probably since I don't have a machine with bios integration -> no tpm startup,
> and your startup is returned with RC_SIZE :(

I don't know why it worked for me. My dTPM2 does not export ACPI device
but I guess firmware does execute startup.

I root caused this quickly and attached patch here. Does that resolve
your issue?


>  rmmod tpm; modprobe tpm_tis force=1 ; dmesg
> modprobe: ERROR: could not insert 'tpm_tis': No such device
> [ 77.744050] tpm_tis tpm_tis: 2.0 TPM (device-id 0x1A, rev-id 16)
> [ 77.816049] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 77.888043] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 77.960043] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 77.960057] genirq: Flags mismatch irq 6. 00000080 (tpm0) vs. 00000000 (floppy)
> [ 77.960067] tpm_tis tpm_tis: Unable to request irq: 6 for probe
> [ 77.960073] genirq: Flags mismatch irq 7. 00000080 (tpm0) vs. 00000000 (parport0)
> [ 77.960077] tpm_tis tpm_tis: Unable to request irq: 7 for probe
> [ 77.960082] genirq: Flags mismatch irq 8. 00000080 (tpm0) vs. 00000000 (rtc0)
> [ 77.960087] tpm_tis tpm_tis: Unable to request irq: 8 for probe
> [ 78.032041] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 78.104043] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 78.176041] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 78.248041] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 78.320041] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 78.392040] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 78.464041] tpm_tis tpm_tis: A TPM error (256) occurred attempting to generate an interrupt
> [ 78.524041] tpm_tis tpm_tis: A TPM error (256) occurred continue selftest
> [ 78.524048] tpm_tis tpm_tis: Firmware has not started TPM
> [ 78.596041] tpm_tis tpm_tis: A TPM error (149) occurred attempting to start the TPM
> [ 78.596048] tpm_tis tpm_tis: TPM self test failed
>
>
> ;(
> Peter

/Jarkko
From e8337658b6f29fc1259b1ddaf81e51ede91219e8 Mon Sep 17 00:00:00 2001
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date: Tue, 16 Dec 2014 23:28:51 +0200
Subject: [PATCH] tpm: invalid size for struct tpm2_startup_header

sizeof(tpm2_pcr_read_in) was used in place of sizeof(tpm2_startup_in).
This patch fixes the issue.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
drivers/char/tpm/tpm2-cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 610dc87..d1b99df 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -411,7 +411,7 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, u32 *value,

#define TPM2_STARTUP_IN_SIZE \
(sizeof(struct tpm_input_header) + \
- sizeof(struct tpm2_pcr_read_in))
+ sizeof(struct tpm2_startup_in))

static const struct tpm_input_header tpm2_startup_header = {
.tag = cpu_to_be16(TPM2_ST_NO_SESSIONS),
--
2.1.0
\
 
 \ /
  Last update: 2014-12-16 23:01    [W:0.056 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site