From: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: "Maciej S. Szmigiero"
<mail-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
Cc: Christophe Ricard
<christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] tpm_tis: override reported C and D timeouts for Atmel 3203
Date: Thu, 12 Jan 2017 22:20:55 +0200 [thread overview]
Message-ID: <20170112202055.uxabnu553qwqql72@intel.com> (raw)
In-Reply-To: <259e1606-255b-5bf4-54bb-1bed967c228a-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
On Thu, Jan 12, 2017 at 09:09:33PM +0100, Maciej S. Szmigiero wrote:
> Hi Jason,
>
> On 12.01.2017 19:42, Jason Gunthorpe wrote:
> > On Thu, Jan 12, 2017 at 07:08:53PM +0100, Maciej S. Szmigiero wrote:
> >> Since commit 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM
> >> access") Atmel 3203 TPM on ThinkPad X61S (TPM firmware version 13.9) no
> >> longer works.
> >> It turns out the initialization proceeds fine until we get and start using
> >> chip-reported timeouts - and the chip reports C and D timeouts of zero.
> >>
> >> Since these are clearly not long enough let's add an override for them
> >> to TPM TIS default values, just as we do for Atmel 3204.
> >> A and B timeouts are set to the same values as the chip normally reports.
> >>
> >> Signed-off-by: Maciej S. Szmigiero <mail-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
> >
> >> static const struct tis_vendor_timeout_override vendor_timeout_overrides[] = {
> >> + /* Atmel 3203 */
> >> + { 0x32031114, { (10*1000), (10*1000),
> >> + (TIS_SHORT_TIMEOUT*1000), (TIS_SHORT_TIMEOUT*1000) } },
> >> /* Atmel 3204 */
> >> { 0x32041114, { (TIS_SHORT_TIMEOUT*1000), (TIS_LONG_TIMEOUT*1000),
> >> (TIS_SHORT_TIMEOUT*1000), (TIS_SHORT_TIMEOUT*1000) } },
> >
> > Can you also add a check for 0 timeouts in the core code and print a
> > FW_BUG :\
>
> Hmm, I dug in history of tpm-interface.c and the code had actually rejected
> zero timeouts until commit 8e54caf407b98e (this is the commit that
> introduced the Atmel 3204 workaround) and let default timeout values remain
> instead (it looks like they were exactly like these in above override at
> that time).
>
> Did Atmel 3204 report wrong but non-zero timeouts?
Wouldn't it make more sense to fix this by re-adding this fallback?
/Jarkko
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
WARNING: multiple messages have this Message-ID (diff)
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
tpmdd-devel@lists.sourceforge.net,
linux-kernel <linux-kernel@vger.kernel.org>,
Peter Huewe <peterhuewe@gmx.de>,
Marcel Selhorst <tpmdd@selhorst.net>,
Christophe Ricard <christophe.ricard@gmail.com>
Subject: Re: [PATCH] tpm_tis: override reported C and D timeouts for Atmel 3203
Date: Thu, 12 Jan 2017 22:20:55 +0200 [thread overview]
Message-ID: <20170112202055.uxabnu553qwqql72@intel.com> (raw)
In-Reply-To: <259e1606-255b-5bf4-54bb-1bed967c228a@maciej.szmigiero.name>
On Thu, Jan 12, 2017 at 09:09:33PM +0100, Maciej S. Szmigiero wrote:
> Hi Jason,
>
> On 12.01.2017 19:42, Jason Gunthorpe wrote:
> > On Thu, Jan 12, 2017 at 07:08:53PM +0100, Maciej S. Szmigiero wrote:
> >> Since commit 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM
> >> access") Atmel 3203 TPM on ThinkPad X61S (TPM firmware version 13.9) no
> >> longer works.
> >> It turns out the initialization proceeds fine until we get and start using
> >> chip-reported timeouts - and the chip reports C and D timeouts of zero.
> >>
> >> Since these are clearly not long enough let's add an override for them
> >> to TPM TIS default values, just as we do for Atmel 3204.
> >> A and B timeouts are set to the same values as the chip normally reports.
> >>
> >> Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
> >
> >> static const struct tis_vendor_timeout_override vendor_timeout_overrides[] = {
> >> + /* Atmel 3203 */
> >> + { 0x32031114, { (10*1000), (10*1000),
> >> + (TIS_SHORT_TIMEOUT*1000), (TIS_SHORT_TIMEOUT*1000) } },
> >> /* Atmel 3204 */
> >> { 0x32041114, { (TIS_SHORT_TIMEOUT*1000), (TIS_LONG_TIMEOUT*1000),
> >> (TIS_SHORT_TIMEOUT*1000), (TIS_SHORT_TIMEOUT*1000) } },
> >
> > Can you also add a check for 0 timeouts in the core code and print a
> > FW_BUG :\
>
> Hmm, I dug in history of tpm-interface.c and the code had actually rejected
> zero timeouts until commit 8e54caf407b98e (this is the commit that
> introduced the Atmel 3204 workaround) and let default timeout values remain
> instead (it looks like they were exactly like these in above override at
> that time).
>
> Did Atmel 3204 report wrong but non-zero timeouts?
Wouldn't it make more sense to fix this by re-adding this fallback?
/Jarkko
next prev parent reply other threads:[~2017-01-12 20:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 18:08 [PATCH] tpm_tis: override reported C and D timeouts for Atmel 3203 Maciej S. Szmigiero
2017-01-12 18:08 ` Maciej S. Szmigiero
[not found] ` <08953fb6-c332-ef29-2614-6335570023be-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
2017-01-12 18:42 ` Jason Gunthorpe
2017-01-12 18:42 ` Jason Gunthorpe
2017-01-12 20:09 ` Maciej S. Szmigiero
2017-01-12 20:19 ` Jason Gunthorpe
[not found] ` <259e1606-255b-5bf4-54bb-1bed967c228a-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
2017-01-12 20:20 ` Jarkko Sakkinen [this message]
2017-01-12 20:20 ` Jarkko Sakkinen
[not found] ` <20170112202055.uxabnu553qwqql72-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-12 21:37 ` Maciej S. Szmigiero
2017-01-12 21:37 ` Maciej S. Szmigiero
[not found] ` <20f8645d-f3fd-550b-b830-d1e55b8f2d17-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org>
2017-01-13 15:50 ` Jarkko Sakkinen
2017-01-13 15:50 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170112202055.uxabnu553qwqql72@intel.com \
--to=jarkko.sakkinen-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mail-APzI5cXaD1zVlRWJc41N0YvC60bnQu0Y@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.