lkml.org 
[lkml]   [2012]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started
On Mon, Oct 01, 2012 at 09:17:28AM +0000, Peter.Huewe@infineon.com wrote:
> Hi Jason,
>
> > The TPM will respond to TPM_GET_CAP with TPM_ERR_INVALID_POSTINIT if
> > TPM_STARTUP has not been issued. This will result in the TPM driver
> > failing to load and no way to recover. Detect this and automatically
> > issue TPM_STARTUP.
>
> > This is for embedded applications where the kernel is the first thing
> > to touch the TPM.
>
> Thanks for working on this.
> I also thought about this scenario quite often.
>
> Shouldn't we then also add a TpmStartup(ST_STATE) in case of a resume?
> rc=GetCapability()
> if(rc==INVALID_POSTINIT)
> tpm_transmit ("TPM_STARTUP(ST_STATE)")...

I'm not familiar enough with how the power management flow works with
the TPM to do this. I don't think that can be the general case
because:

3. If stType = TPM_ST_STATE
a. If the TPM has no state to restore, the TPM MUST set the internal
state such that it returns TPM_FAILEDSELFTEST to all subsequent
commands.

So you need to know a save state exists in the TPM before attempting
the command?

Would you agree that CLEAR is appropriate for an initial driver
attach on probe?

Jason


\
 
 \ /
  Last update: 2012-10-02 01:41    [W:0.071 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site