Re: [tpmdd-devel] [PATCH 1/3] tpm/tpm_crb: implement tpm crb idle state

2016-09-07 Thread Winkler, Tomas
> On Wed, Sep 07, 2016 at 02:32:31PM +0300, Tomas Winkler wrote: > > The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady for > > SW to indicate that the device can enter or should exit the idle state. > > > > The legacy ACPI-start (SMI + DMA) based devices do not support these > > bit

Re: [tpmdd-devel] [PATCH 2/3] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-09-07 Thread Winkler, Tomas
> > On Wed, Sep 07, 2016 at 02:32:32PM +0300, Tomas Winkler wrote: > > INIT_LIST_HEAD(&resources); > > - ret = acpi_dev_get_resources(device, &resources, > crb_check_resource, > > -&io_res); > > + ret = acpi_dev_get_resources(device, &resources, > > +

Re: [tpmdd-devel] [PATCH 2/3] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-09-07 Thread Winkler, Tomas
> > On Wed, Sep 07, 2016 at 09:21:34PM +, Winkler, Tomas wrote: > > > > > > > > On Wed, Sep 07, 2016 at 02:32:32PM +0300, Tomas Winkler wrote: > > > > INIT_LIST_HEAD(&resources); > > > > - ret = acpi_dev_

Re: [tpmdd-devel] [PATCH 1/3] tpm/tpm_crb: implement tpm crb idle state

2016-09-07 Thread Winkler, Tomas
> -Original Message- > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > Sent: Thursday, September 08, 2016 00:55 > To: Winkler, Tomas > Cc: tpmdd-devel@lists.sourceforge.net; Jarkko Sakkinen > > Subject: Re: [tpmdd-devel] [PATCH 1/3] tpm/tpm_c

Re: [tpmdd-devel] [PATCH 1/3] tpm/tpm_crb: implement tpm crb idle state

2016-09-07 Thread Winkler, Tomas
> > On Wed, Sep 07, 2016 at 10:17:22PM +, Winkler, Tomas wrote: > > > I think there is a memory leak in tpm_tis on the error path; maybe a > > missing call to dev_put, not sure I had just quick look. > > tpmm_alloc uses devm, so the put happens in a devm cleanu

Re: [tpmdd-devel] [PATCH 1/3] tpm/tpm_crb: implement tpm crb idle state

2016-09-07 Thread Winkler, Tomas
> On Wed, Sep 07, 2016 at 10:28:45PM +0000, Winkler, Tomas wrote: > > > > > > On Wed, Sep 07, 2016 at 10:17:22PM +, Winkler, Tomas wrote: > > > > > > > I think there is a memory leak in tpm_tis on the error path; maybe > > > > a m

Re: [tpmdd-devel] [PATCH 1/3] tpm/tpm_crb: implement tpm crb idle state

2016-09-08 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Thursday, September 08, 2016 14:18 > To: Winkler, Tomas > Cc: tpmdd-devel@lists.sourceforge.net > Subject: Re: [PATCH 1/3] tpm/tpm_crb: implement tpm crb idle state > >

Re: [tpmdd-devel] [PATCH 2/4 v2] tpm/tpm_crb: cache cmd_size register value.

2016-09-12 Thread Winkler, Tomas
> > On Mon, Sep 12, 2016 at 01:49:16PM +0300, Jarkko Sakkinen wrote: > > On Mon, Sep 12, 2016 at 02:03:53AM +0300, Tomas Winkler wrote: > > > Instead of expensive register access on retrieving cmd_size on each > > > send, save the value during initialization in the private context. > > > The value

Re: [tpmdd-devel] [PATCH v2 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-12 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Monday, September 12, 2016 15:01 > To: Winkler, Tomas > Cc: tpmdd-devel@lists.sourceforge.net; Jason Gunthorpe > > Subject: Re: [PATCH v2 1/4] tpm/tpm_crb: impleme

Re: [tpmdd-devel] [PATCH v2 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-12 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Monday, September 12, 2016 16:32 > To: Winkler, Tomas > Cc: tpmdd-devel@lists.sourceforge.net; Jason Gunthorpe > > Subject: Re: [PATCH v2 1/4] tpm/tpm_crb: implement tpm c

Re: [tpmdd-devel] [PATCH v2 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-12 Thread Winkler, Tomas
> > On Mon, Sep 12, 2016 at 11:54:58AM +0300, Tomas Winkler wrote: > > The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady for > > SW to indicate that the device can enter or should exit the idle state. > > > > The legacy ACPI-start (SMI + DMA) based devices do not support these > >

Re: [tpmdd-devel] [PATCH v2 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-12 Thread Winkler, Tomas
> On Mon, Sep 12, 2016 at 11:39:02AM -0600, Jason Gunthorpe wrote: > > On Mon, Sep 12, 2016 at 12:25:21PM +, Winkler, Tomas wrote: > > > > > > @pdev: CRB platform device > > > > > > I find pdev here a bit misleading this is not a platform

Re: [tpmdd-devel] [PATCH v2 3/4] tpm/tpm_crb: open code the crb_init into acpi_add

2016-09-12 Thread Winkler, Tomas
> > On Mon, Sep 12, 2016 at 11:55:00AM +0300, Tomas Winkler wrote: > > This is preparation step for implementing tpm crb runtime pm. We need > > to have tpm chip allocated and populated before we access the runtime > > handlers. > > This should probably be the first patch and then you can use the

Re: [tpmdd-devel] [PATCH v2 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-12 Thread Winkler, Tomas
> > On Mon, Sep 12, 2016 at 08:26:34PM +, Winkler, Tomas wrote: > > > > Signed-off-by: Tomas Winkler > > > > V2: do not export the functions via tpm ops > > > > > > You need to restructure this series, do not implement functions that >

Re: [tpmdd-devel] [PATCH v3 0/4] tpm/tpm_crb: implement power management.

2016-09-13 Thread Winkler, Tomas
On Mon, 2016-09-12 at 16:04 +0300, Tomas Winkler wrote: > Te overall platform ability to enter a low power state is also > conditioned on the ability of a tpm device to go to idle state. > This series should provide this feature. > > Unfortunately, there is a HW bug on Intel PTT devices on Skylake

Re: [tpmdd-devel] [PATCH v3 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-14 Thread Winkler, Tomas
> Subject: Re: [PATCH v3 1/4] tpm/tpm_crb: implement tpm crb idle state > > On Mon, Sep 12, 2016 at 04:04:18PM +0300, Tomas Winkler wrote: > > The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady for > > SW to indicate that the device can enter or should exit the idle state. > > > > T

Re: [tpmdd-devel] [PATCH v3 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-15 Thread Winkler, Tomas
> > > Subject: Re: [PATCH v3 1/4] tpm/tpm_crb: implement tpm crb idle > > > state > > > > > > On Mon, Sep 12, 2016 at 04:04:18PM +0300, Tomas Winkler wrote: > > > > The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady > > > > for SW to indicate that the device can enter or should exit

Re: [tpmdd-devel] [PATCH v3 1/4] tpm/tpm_crb: implement tpm crb idle state

2016-09-15 Thread Winkler, Tomas
> On Thu, Sep 15, 2016 at 08:23:03AM +0000, Winkler, Tomas wrote: > > > > > Subject: Re: [PATCH v3 1/4] tpm/tpm_crb: implement tpm crb idle > > > > > state > > > > > > > > > > On Mon, Sep 12, 2016 at 04:04:18PM +0300, Tomas Winkler w

Re: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions

2016-09-20 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Monday, September 19, 2016 23:22 > To: Peter Huewe > Cc: moderated list:TPM DEVICE DRIVER de...@lists.sourceforge.net>; open list > Subject: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expr

Re: [tpmdd-devel] [PATCH 2/2] tpm: fix bad constant expressions

2016-09-20 Thread Winkler, Tomas
> On Tue, Sep 20, 2016 at 07:08:40AM +0000, Winkler, Tomas wrote: > > > > > -Original Message- > > > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > > > Sent: Monday, September 19, 2016 23:22 > > > To: Peter Huewe >

Re: [tpmdd-devel] Possible issue with tpm_crb runtime PM

2016-09-20 Thread Winkler, Tomas
> > Hi > > I get this (probably every time) when I do rmmod: > > [ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the TPM > > That is probably caused by failing TPM2_Shutdown. My guess is that runtime > PM patches cause this. > > I'll verify that the problem does not occur with th

Re: [tpmdd-devel] Possible issue with tpm_crb runtime PM

2016-09-20 Thread Winkler, Tomas
> On Tue, Sep 20, 2016 at 01:30:58PM +0000, Winkler, Tomas wrote: > > > > > > > > Hi > > > > > > I get this (probably every time) when I do rmmod: > > > > > > [ 4372.725616] tpm tpm0: A TPM error (325) occurred stopping the TPM > &g

Re: [tpmdd-devel] Possible issue with tpm_crb runtime PM

2016-09-25 Thread Winkler, Tomas
> > On Tue, Sep 20, 2016 at 07:26:08PM +, Winkler, Tomas wrote: > > > On Tue, Sep 20, 2016 at 01:30:58PM +, Winkler, Tomas wrote: > > > > > > > > > > > > > > Hi > > > > > > > > > > I get this (probabl

Re: [tpmdd-devel] [PATCH v3 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-09-27 Thread Winkler, Tomas
> > On Thu, Sep 15, 2016 at 09:23:29AM +0300, Jarkko Sakkinen wrote: > > On Mon, Sep 12, 2016 at 04:04:19PM +0300, Tomas Winkler wrote: > > > There is a HW bug in Skylake, and Broxton PCH Intel PTT device, > > > where most of the registers in the control area except START, > > > REQUEST, CANCEL, a

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-03 Thread Winkler, Tomas
> On Sun, Oct 02, 2016 at 01:24:55PM +0300, Jarkko Sakkinen wrote: > > On Sun, Oct 02, 2016 at 01:17:55PM +0300, Jarkko Sakkinen wrote: > > > On Sun, Oct 02, 2016 at 10:39:31AM +0300, Tomas Winkler wrote: > > > > In tpm_del_char_device device_del is called prior to tpm2_shutdown > > > > where it i

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-03 Thread Winkler, Tomas
> > > On Sun, Oct 02, 2016 at 01:24:55PM +0300, Jarkko Sakkinen wrote: > > > On Sun, Oct 02, 2016 at 01:17:55PM +0300, Jarkko Sakkinen wrote: > > > > On Sun, Oct 02, 2016 at 10:39:31AM +0300, Tomas Winkler wrote: > > > > > In tpm_del_char_device device_del is called prior to > > > > > tpm2_shutdow

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-03 Thread Winkler, Tomas
> > On Mon, Oct 03, 2016 at 03:42:25PM +0300, Jarkko Sakkinen wrote: > > > > I've looked to the registration code and it indeed has few more > > > issues > > ? > > > > Maybe TPM_CHIP_FLAG_REGISTERED can be used for sealing the access to > > > the device during deregistration, current usage is v

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-03 Thread Winkler, Tomas
> On Mon, Oct 03, 2016 at 07:05:48AM +0000, Winkler, Tomas wrote: > > > > This patch is wrong, I though the comments were clear. All entry > > > points to find the device must be deleted before we commit to shutting > down the device. > > > > > > Y

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-04 Thread Winkler, Tomas
> On Tue, Oct 04, 2016 at 08:19:46AM +0300, Jarkko Sakkinen wrote: > > > > Make the driver uncallable first. The worst race that can happen is > > > that open("/dev/tpm0", ...) returns -EPIPE. I do not consider this > > > fatal at all. > > > > No responses for this reasonable proposal so I'll sho

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-05 Thread Winkler, Tomas
> > > > > On Tue, Oct 04, 2016 at 08:19:46AM +0300, Jarkko Sakkinen wrote: > > > > > > > > Make the driver uncallable first. The worst race that can happen > > > > > is that open("/dev/tpm0", ...) returns -EPIPE. I do not consider > > > > > this fatal at all. > > > > > > > > No responses for this r

Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: revamp starting method setting.

2016-10-05 Thread Winkler, Tomas
> On Wed, Oct 05, 2016 at 04:12:08PM +0300, Tomas Winkler wrote: > > Encapsulate the start method parsing in a single function and add > > needed debug printouts. > > It eliminates small issue with useless double checking for > > ACPI_TPM2_MEMORY_MAPPED. > > Start method is trival to check from TP

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-05 Thread Winkler, Tomas
> > On Wed, Oct 05, 2016 at 07:48:59AM +, Winkler, Tomas wrote: > > > > down_write(&chip->ops_sem); > > > > chip->ops = NULL; > > > > up_write(&chip->ops_sem); > > > > > > No, that is wrong as well, another t

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-05 Thread Winkler, Tomas
> On Wed, Oct 05, 2016 at 08:09:17PM +0000, Winkler, Tomas wrote: > > > It could, but that patch was not merged yet, and I believe even if the > > issue is exposed only with runtime_pm currently, we have a bug in > > design even w/o runtime pm. > > Please

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-07 Thread Winkler, Tomas
> On Thu, Oct 06, 2016 at 12:43:13AM +0000, Winkler, Tomas wrote: > > > > You keep asserting that, but it just isn't true at all. > > > > Okay, let's rephrase, that calling device_del before tpm_transmit is not > > sane > when using runtime_pm.

Re: [tpmdd-devel] [PATCH] tpm: don't destroy chip device prematurely

2016-10-07 Thread Winkler, Tomas
> Subject: Re: [PATCH] tpm: don't destroy chip device prematurely > > On Fri, Oct 07, 2016 at 02:24:59PM +0000, Winkler, Tomas wrote: > > > So here I'm to say I'm sorry for misleading this, after all the doubts > > I got back to debugging and tra

Re: [tpmdd-devel] [PATCH 4/4] tmp/tpm_crb: implement runtime pm for tpm_crb

2016-10-08 Thread Winkler, Tomas
> > On Sat, Oct 08, 2016 at 02:59:39PM +0300, Tomas Winkler wrote: > > From: "Winkler, Tomas" > > > > Utilize runtime_pm for driving tpm crb idle states. > > The framework calls cmd_ready from the pm_runtime_resume handler and > > go idle fr

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> > On Sat, Oct 08, 2016 at 02:59:37PM +0300, Tomas Winkler wrote: > > From: "Winkler, Tomas" > > > > There is a HW bug in Skylake, Kabylake, and Broxton PCH Intel PTT > > device, where most of the registers in the control area except START, > > REQ

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> > On Sat, Oct 08, 2016 at 02:27:06PM +, Winkler, Tomas wrote: > > > > > > On Sat, Oct 08, 2016 at 02:59:37PM +0300, Tomas Winkler wrote: > > > > From: "Winkler, Tomas" > > > > > > > > There is a HW bug in Skylake,

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> On Sat, Oct 08, 2016 at 07:00:06PM +0300, Jarkko Sakkinen wrote: > > > Rather you it would be better not to use cmdReady/goIdle at all if > > kernel is not compiled with CONFIG_PM. > > It would be best practice to ensure the tpm is powered up no matter how the > kernel is compiled.. The firmwa

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> Subject: Re: [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state > > On Sat, Oct 08, 2016 at 04:56:39PM +, Winkler, Tomas wrote: > > > > > > > > On Sat, Oct 08, 2016 at 02:27:06PM +, Winkler, Tomas wrote: > > > > > > >

Re: [tpmdd-devel] [PATCH 4/4] tmp/tpm_crb: implement runtime pm for tpm_crb

2016-10-08 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Saturday, October 08, 2016 19:01 > To: Winkler, Tomas > Cc: tpmdd-devel@lists.sourceforge.net; Jason Gunthorpe > ; linux-ker...@vger.kernel.org > Subject: Re: [PATCH 4/4] t

Re: [tpmdd-devel] [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle state

2016-10-08 Thread Winkler, Tomas
> > > Subject: Re: [PATCH 2/4] tmp/tpm_crb: fix Intel PTT hw bug during idle > > state > > > > On Sat, Oct 08, 2016 at 04:56:39PM +, Winkler, Tomas wrote: > > > > > > > > > > > On Sat, Oct 08, 2016 at 02:27:06PM +, Winkler, Tom

Re: [tpmdd-devel] [PATCH 2/2] tpm: enhance TPM 2.0 PCR extend to support multiple banks

2016-10-08 Thread Winkler, Tomas
> Like TPM 1.2, the current device driver for TPM 2.0 supports extending only to > the SHA1 PCR bank. But the TPM 2.0 supports multiple PCR banks and the > specification recommends extending to all active PCR banks, this patch > enhances the existing device driver support for TPM 2.0 extend functio

Re: [tpmdd-devel] [PATCH RFC 3/3] tpm_crb: request and relinquish locality 0

2016-10-08 Thread Winkler, Tomas
> > Request and relinquish locality for the driver use in order to be a better > citizen > in a multi locality environment like with TXT as it uses locality 2. > > Signed-off-by: Jarkko Sakkinen > --- > drivers/char/tpm/tpm_crb.c | 36 > 1 file changed

Re: [tpmdd-devel] [PATCH RFC 3/3] tpm_crb: request and relinquish locality 0

2016-10-09 Thread Winkler, Tomas
> > > > > > > > Request and relinquish locality for the driver use in order to be a better > citizen > > > in a multi locality environment like with TXT as it uses locality 2. > > > > > > > > Signed-off-by: Jarkko Sakkinen > > > --- > > > drivers/char/tpm/tpm_crb.c | 36 > > > +++

Re: [tpmdd-devel] [PATCH RFC 1/3] tpm_crb: expand struct crb_control_area to struct crb_regs

2016-10-09 Thread Winkler, Tomas
> -Original Message- > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > Sent: Monday, October 10, 2016 02:08 > To: Jarkko Sakkinen > Cc: moderated list:TPM DEVICE DRIVER ; > open list > Subject: Re: [tpmdd-devel] [PATCH RFC 1/3] tpm_crb: expand struct > crb_control_area

Re: [tpmdd-devel] [PATCH 2/3] tpm_crb: encapsulate crb_wait_for_reg_32

2016-10-11 Thread Winkler, Tomas
> Encapsulated crb_wait_for_reg32() so that state changes in other CRB registers > than TPM_CRB_CTRL_REQ_x can be waited. > > Signed-off-by: Jarkko Sakkinen > --- > drivers/char/tpm/tpm_crb.c | 40 +++- > 1 file changed, 23 insertions(+), 17 deletions(-) > >

Re: [tpmdd-devel] [PATCH 2/2] tpm: enhance TPM 2.0 PCR extend to support multiple banks

2016-10-12 Thread Winkler, Tomas
> > > On 10/09/2016 11:58 AM, Winkler, Tomas wrote: > >> Like TPM 1.2, the current device driver for TPM 2.0 supports > >> extending only to the SHA1 PCR bank. But the TPM 2.0 supports > >> multiple PCR banks and the specification recommends extending to a

Re: [tpmdd-devel] [PATCH] tpm, tpm_crb: remove redundant CRB_FL_CRB_START flag

2016-10-19 Thread Winkler, Tomas
> > On Mon, Oct 17, 2016 at 11:42:24PM +0300, Jarkko Sakkinen wrote: > > Because all the existing hardware have HID MSFT0101 we end up always > > setting CRB_FL_CRB_START flag as a workaround for 4th Gen Core CPUs. > > Even if ACPI start is used, the driver will always issue also CRB start. Do

Re: [tpmdd-devel] [PATCH v5 7/7] tpm: replace or remove printk error messages

2016-10-20 Thread Winkler, Tomas
> On Tue, Oct 18, 2016 at 08:49:45PM -0400, Nayna Jain wrote: > > This patch removes the unnecessary error messages on failing to > > allocate memory and replaces pr_err/printk with dev_dbg/dev_info as > > applicable. > > > > Suggested-by: Jason Gunthorpe > > Signed-off-by: Nayna Jain > > Review

Re: [tpmdd-devel] [PATCH v4] tpm_tis: Check return values from get_burstcount.

2016-10-27 Thread Winkler, Tomas
> > If the TPM we're connecting to uses a static burst count, it will report a > burst > count of zero throughout the response read. However, get_burstcount assumes > that a response of zero indicates that the TPM is not ready to receive more > data. In this case, it returns a negative error code

Re: [tpmdd-devel] [PATCH 3/3] tpm: Get rid of TPM_CHIP_FLAG_REGISTERED

2016-10-27 Thread Winkler, Tomas
> > This is no longer necessary, all calls to tpm_chip_unregister happen in > remove() callbacks. > > Signed-off-by: Jason Gunthorpe > --- > drivers/char/tpm/tpm-chip.c | 5 - > drivers/char/tpm/tpm.h | 1 - > 2 files changed, 6 deletions(-) > > diff --git a/drivers/char/tpm/tpm-chip

Re: [tpmdd-devel] tpm_tis regression in 4.9?

2016-10-31 Thread Winkler, Tomas
> > On Fri, Oct 28, 2016 at 05:37:45PM +0300, Jarkko Sakkinen wrote: > > > > I think this patch from Jarkko's next is the fix: > > > > > > http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/65da72b7dd > > > cdd8990e4783d09c7e86d90ccb4121 > > > > > > Jarkko? Can you hurry that along to go i

Re: [tpmdd-devel] tpm_tis regression in 4.9?

2016-11-01 Thread Winkler, Tomas
> > On Mon, Oct 31, 2016 at 08:16:59PM +, Winkler, Tomas wrote: > > > > > > On Fri, Oct 28, 2016 at 05:37:45PM +0300, Jarkko Sakkinen wrote: > > > > > > > > I think this patch from Jarkko's next is the fix: > > > > >

Re: [tpmdd-devel] [PATCH 2/2] tpm/tpm2-chip: fix kdoc errors

2016-11-14 Thread Winkler, Tomas
.org > Subject: Re: [PATCH 2/2] tpm/tpm2-chip: fix kdoc errors > > On Tue, Nov 01, 2016 at 03:05:14AM +0200, Tomas Winkler wrote: > > Use correct kdoc format, describe correct parameters and return values. > > > > Signed-off-by: Tomas Winkler > > --- > > drivers/char/tpm/tpm2-cmd.c | 107 > > +++

Re: [tpmdd-devel] [PATCH 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd

2016-11-22 Thread Winkler, Tomas
> > On Wed, Nov 16, 2016 at 07:03:38PM +0200, Tomas Winkler wrote: > > Functions tpm_transmit and transmit_cmd are referenced from other > > functions kdoc hence deserve documentation. > > > > Signed-off-by: Tomas Winkler > > Do you know how to make "make htmldocs" to generate documentation for

Re: [tpmdd-devel] [PATCH] tpm: use get_unaligned_be32 unaligned buffer access.

2016-11-23 Thread Winkler, Tomas
> On Wed, Nov 23, 2016 at 01:04:54PM +0200, Tomas Winkler wrote: > > Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on all > > platforms for unaligned access. > > > > The fix doesn't cover all the cases as also some cast structures have > > members on unaligned addresses. > > I think

Re: [tpmdd-devel] [PATCH v2 1/3] tpm_crb: map locality registers

2016-12-05 Thread Winkler, Tomas
> > --- > > drivers/char/tpm/tpm_crb.c | 96 > > ++ > > 1 file changed, 64 insertions(+), 32 deletions(-) > > > > diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c > > index 717b6b4..8d81b66 100644 > > --- a/drivers/char/tpm/tpm_crb.c

Re: [tpmdd-devel] [PATCH v2 1/3] tpm_crb: map locality registers

2016-12-05 Thread Winkler, Tomas
> > On Mon, Dec 05, 2016 at 12:07:51PM +, Winkler, Tomas wrote: > > > > --- > > > > drivers/char/tpm/tpm_crb.c | 96 > > > > ++ > > > > 1 file changed, 64 insertions(+), 32 deletions(-) &

Re: [tpmdd-devel] [PATCH v2 2/3] tpm_crb: encapsulate crb_wait_for_reg_32

2016-12-05 Thread Winkler, Tomas
> CC linux-security-module > > On Sat, Dec 03, 2016 at 07:52:12PM +0200, Jarkko Sakkinen wrote: > > Encapsulated crb_wait_for_reg32() so that state changes in other CRB > > registers than TPM_CRB_CTRL_REQ_x can be waited. > > > > Signed-off-by: Jarkko Sakkinen > > --- > > drivers/char/tpm/tpm_cr

Re: [tpmdd-devel] [PATCH v2 3/3] tpm_crb: request and relinquish locality 0

2016-12-05 Thread Winkler, Tomas
> > CC linux-security-module > > On Sat, Dec 03, 2016 at 07:52:13PM +0200, Jarkko Sakkinen wrote: > > Request and relinquish locality for the driver use in order to be a > > better citizen in a multi locality environment like TXT. The locality > > is requested and relinquished as part of going in

Re: [tpmdd-devel] [PATCH v2 1/4] tpm: add kdoc for tpm_transmit and tpm_transmit_cmd

2016-12-06 Thread Winkler, Tomas
> -Original Message- > From: Nayna [mailto:na...@linux.vnet.ibm.com] > Sent: Tuesday, December 06, 2016 11:17 > To: Jarkko Sakkinen ; Winkler, Tomas > > Cc: tpmdd-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org > Subject: Re: [tpmdd-devel] [PATCH v2 1

Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers

2016-12-12 Thread Winkler, Tomas
> > In order to provide access to locality registers, this commits adds mapping of > the head of the CRB registers, which are located right before the control > area. > > Signed-off-by: Jarkko Sakkinen > --- > drivers/char/tpm/tpm_crb.c | 89 + > - >

Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers

2016-12-12 Thread Winkler, Tomas
> > I've tested is completley disjoint from the region pointed by the ACPI device > tree (SSDT in PTT's case). > > Here's example device from my x250: > > Device (TPM) > { > Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */) // _HID: Hardware ID > Name (_STR, Unicode ("TPM 2.0 Device")) //

Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers

2016-12-12 Thread Winkler, Tomas
> > On Mon, Dec 12, 2016 at 02:25:32PM +, Winkler, Tomas wrote: > > > > > > > > In order to provide access to locality registers, this commits > > > > adds mapping of the head of the CRB registers, which are located right > before the contro

Re: [tpmdd-devel] Intel NUC and fTPM issue on 4.9.2

2017-02-16 Thread Winkler, Tomas
This is a BIOS issue + kernel ACPI platform driver refusing to handle overlapping memory space. The issue here is that the ACPI platform driver is not created, however this should not prevent the tpm_crb driver from working as it registers directly the ACPI device. For now you can suppress the

Re: [tpmdd-devel] Intel NUC and fTPM issue on 4.9.2

2017-02-19 Thread Winkler, Tomas
g for that via intel support page so we can follow up on that. Thanks Tomas From: Davide Guerri [mailto:davide.gue...@gmail.com] Sent: Friday, February 17, 2017 23:15 To: Jason Gunthorpe Cc: Sakkinen, Jarkko ; Winkler, Tomas ; tpmdd-devel@lists.sourceforge.net Subject: Re: [tpmdd-devel] Intel NU

Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: enter the low power state upon device suspend

2017-03-06 Thread Winkler, Tomas
> > On Mon, Mar 06, 2017 at 01:53:35AM +0200, Tomas Winkler wrote: > > This fix enables a platform to enter the idle state (suspend-to-idle) > > > > The driver needs to request explicitly go_idle upon completion from > > the pm suspend handler. > > The runtime pm is disabled on suspend during pre

Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: mark PM functions as __maybe_unused

2017-03-20 Thread Winkler, Tomas
> > When CONFIG_PM_SLEEP is disabled, we get a warning about unused > functions: > > drivers/char/tpm/tpm_crb.c:551:12: error: 'crb_pm_resume' defined but not > used [-Werror=unused-function] > drivers/char/tpm/tpm_crb.c:540:12: error: 'crb_pm_suspend' defined but not > used [-Werror=unused-funct

Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: mark PM functions as __maybe_unused

2017-03-20 Thread Winkler, Tomas
> On Mon, Mar 20, 2017 at 1:11 PM, Winkler, Tomas > wrote: > >> > >> When CONFIG_PM_SLEEP is disabled, we get a warning about unused > >> functions: > >> > >> drivers/char/tpm/tpm_crb.c:551:12: error: 'crb_pm_resume' defined but

Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: mark PM functions as __maybe_unused

2017-03-20 Thread Winkler, Tomas
> > On Mon, Mar 20, 2017 at 11:01:36PM +, Winkler, Tomas wrote: > > > I believe that in this case the #ifdefs can be done correctly quite > > easily, but now I'm not against your solution as well, just maybe put > > some of this info to the commit message

Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: fix unused warnings on suspend/resume functions

2017-03-21 Thread Winkler, Tomas
> On Thu, Mar 16, 2017 at 09:51:33PM -0400, Jérémy Lefaure wrote: > > When PM_SLEEP is disabled crb_pm_suspend and crb_pm_resume are not > > used by SET_SYSTEM_SLEEP_PM_OPS even if PM is enabled: > > > > drvers/char/tpm/tpm_crb.c:540:12: warning: ‘crb_pm_suspend’ defined > > but not used [-Wunused-

Re: [tpmdd-devel] [PATCH] tpm/tpm_crb: fix unused warnings on suspend/resume functions

2017-03-27 Thread Winkler, Tomas
> > On Tue, Mar 21, 2017 at 10:05:36PM +, Winkler, Tomas wrote: > > > On Thu, Mar 16, 2017 at 09:51:33PM -0400, Jérémy Lefaure wrote: > > > > When PM_SLEEP is disabled crb_pm_suspend and crb_pm_resume are > not > > > > used by SET

Re: [tpmdd-devel] Intel NUC and fTPM issue on 4.9.2

2017-04-18 Thread Winkler, Tomas
> -Original Message- > From: Jarkko Sakkinen [mailto:jarkko.sakki...@linux.intel.com] > Sent: Monday, February 20, 2017 12:48 > To: Jason Gunthorpe > Cc: Sakkinen, Jarkko ; tpmdd- > de...@lists.sourceforge.net; davide.gue...@gmail.com > Subject: Re: [tpmdd-devel] Intel NUC and fTPM issue

Re: [tpmdd-devel] [PATCH] Add "shutdown" to "struct class".

2017-05-13 Thread Winkler, Tomas
> The TPM class has some common shutdown code that must be executed for > all drivers. This adds some needed functionality for that The issue with this is, that on some platforms the only storage can be eMMC and TPM is using it,. It has to be ensured that the storage device won't go down befor

Re: [tpmdd-devel] [PATCH] Add "shutdown" to "struct class".

2017-05-15 Thread Winkler, Tomas
> > On Sat, May 13, 2017 at 12:43:11PM +, Winkler, Tomas wrote: > > > The TPM class has some common shutdown code that must be executed > > > for all drivers. This adds some needed functionality for that > > > > The issue with this is, that on some platfo

Re: [tpmdd-devel] [PATCH v3] Add "shutdown" to "struct class".

2017-05-15 Thread Winkler, Tomas
> -Original Message- > From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] > Sent: Monday, May 15, 2017 20:46 > To: Josh Zimmerman > Cc: Greg Kroah-Hartman ; linux- > ker...@vger.kernel.org; Winkler, Tomas ; Jarkko > Sakkinen ; tpmdd- > de...@lists.s