RE: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-08 Thread Peter.Huewe
Hi Kent, > Peter, you mentioned you have some embedded setups, would you be able > to test? I could probably test it on the beagleboard c4 with our Infineon SLB9635 TT1.2 I2C TPM, but I'm currently not sure if I have the suspend/resume thing currently running correctly. Apart from that I

RE: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-08 Thread Peter.Huewe
Hi Kent, Peter, you mentioned you have some embedded setups, would you be able to test? I could probably test it on the beagleboard c4 with our Infineon SLB9635 TT1.2 I2C TPM, but I'm currently not sure if I have the suspend/resume thing currently running correctly. Apart from that I also

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-04 Thread Jason Gunthorpe
On Thu, Oct 04, 2012 at 12:41:15PM -0500, Kent Yoder wrote: > I'd rather see us just track the state and do the right thing > here. If we don't get invalid postinit if we call tpm_startup during > tpm_tis_init/tpm_tis_i2c_init, then set a flag we switch on here. At least on my platform it is

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-04 Thread Kent Yoder
> Curiously the current code does call TPM_SaveState on suspend, but > relies on the BIOS to do TPM_Startup(ST_STATE) on resume, why the > asymmetry? This is based on the PC Client Implementation for BIOS spec in the TCG. On suspend, the OS is responsible for the save state and then on resume

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-04 Thread Kent Yoder
Curiously the current code does call TPM_SaveState on suspend, but relies on the BIOS to do TPM_Startup(ST_STATE) on resume, why the asymmetry? This is based on the PC Client Implementation for BIOS spec in the TCG. On suspend, the OS is responsible for the save state and then on resume the

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-04 Thread Jason Gunthorpe
On Thu, Oct 04, 2012 at 12:41:15PM -0500, Kent Yoder wrote: I'd rather see us just track the state and do the right thing here. If we don't get invalid postinit if we call tpm_startup during tpm_tis_init/tpm_tis_i2c_init, then set a flag we switch on here. At least on my platform it is

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Jason Gunthorpe
On Mon, Oct 01, 2012 at 12:10:03PM -0500, Kent Yoder wrote: > > 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,

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Kent Yoder
On Mon, Oct 01, 2012 at 10:15:36AM -0600, Jason Gunthorpe wrote: > On Mon, Oct 01, 2012 at 09:17:28AM +, peter.hu...@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

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Jason Gunthorpe
On Mon, Oct 01, 2012 at 09:17:28AM +, peter.hu...@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

RE: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Peter.Huewe
>I welcome such functionality. Thanks for your efforts. Me too ;) Peter Huewe Infineon Technologies AG CCS TI SWT SW ESW Tel:+49 821 25851-86 Fax:+49 821 25851-40 peter.hu...@infineon.com VISIT US AT: www.infineon.com * Infineon Technologies AG Vorsitzender des

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Jonathan McCune
Hi Jason, On Sun, Sep 30, 2012 at 7:30 PM, Jason Gunthorpe wrote: > 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

RE: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Peter.Huewe
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

RE: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Peter.Huewe
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

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Jonathan McCune
Hi Jason, On Sun, Sep 30, 2012 at 7:30 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: 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

RE: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Peter.Huewe
I welcome such functionality. Thanks for your efforts. Me too ;) Peter Huewe Infineon Technologies AG CCS TI SWT SW ESW Tel:+49 821 25851-86 Fax:+49 821 25851-40 peter.hu...@infineon.com VISIT US AT: www.infineon.com * Infineon Technologies AG Vorsitzender des Aufsichtsrats:

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Jason Gunthorpe
On Mon, Oct 01, 2012 at 09:17:28AM +, peter.hu...@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

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Kent Yoder
On Mon, Oct 01, 2012 at 10:15:36AM -0600, Jason Gunthorpe wrote: On Mon, Oct 01, 2012 at 09:17:28AM +, peter.hu...@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

Re: [tpmdd-devel] [PATCH] TPM: Issue TPM_STARTUP at driver load if the TPM has not been started

2012-10-01 Thread Jason Gunthorpe
On Mon, Oct 01, 2012 at 12:10:03PM -0500, Kent Yoder wrote: 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