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

2016-10-11 Thread Jarkko Sakkinen
In order to allow to use locality 0, expand the data structure to expose all of the CRB registers. The address is calculated from the control area address in order to retain backwards compatibility to ACPI start based hardware (pre-Skylake). Signed-off-by: Jarkko Sakkinen

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

2016-10-09 Thread Jarkko Sakkinen
l.com> > > Cc: moderated list:TPM DEVICE DRIVER <tpmdd-devel@lists.sourceforge.net>; > > open list <linux-ker...@vger.kernel.org> > > Subject: Re: [tpmdd-devel] [PATCH RFC 1/3] tpm_crb: expand struct > > crb_control_area to struct crb_regs > > > > O

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

2016-10-09 Thread Jarkko Sakkinen
On Sun, Oct 09, 2016 at 05:07:37PM -0600, Jason Gunthorpe wrote: > On Sun, Oct 09, 2016 at 09:33:58PM +0300, Jarkko Sakkinen wrote: > > > > Sorry I missed this part. > > > > > > Here are the constraints for existing hardware: > > > > > > 1. All the existing CRB start only hardware has the iomem

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

2016-10-09 Thread Jason Gunthorpe
On Mon, Oct 10, 2016 at 12:25:11AM +, Winkler, Tomas wrote: > I addition I believe it should be always on offset FED4_0xxxh by the > Spec, so all this arithmetic is a bit of overkill. We don't have any hard coded addresses in the drivers - that seems very inappropriate these days.. Is that

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

2016-10-09 Thread Winkler, Tomas
gt;; > open list <linux-ker...@vger.kernel.org> > Subject: Re: [tpmdd-devel] [PATCH RFC 1/3] tpm_crb: expand struct > crb_control_area to struct crb_regs > > On Sun, Oct 09, 2016 at 09:33:58PM +0300, Jarkko Sakkinen wrote: > > > > Sorry I missed this part. > > >

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

2016-10-09 Thread Jason Gunthorpe
On Sun, Oct 09, 2016 at 09:33:58PM +0300, Jarkko Sakkinen wrote: > > Sorry I missed this part. > > > > Here are the constraints for existing hardware: > > > > 1. All the existing CRB start only hardware has the iomem covering the > >control area and registers for multiple localities. > > 2.

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

2016-10-09 Thread Jarkko Sakkinen
On Sun, Oct 09, 2016 at 09:32:32PM +0300, Jarkko Sakkinen wrote: > On Sun, Oct 09, 2016 at 10:49:05AM -0600, Jason Gunthorpe wrote: > > On Sun, Oct 09, 2016 at 12:38:18PM +0300, Jarkko Sakkinen wrote: > > > On Sat, Oct 08, 2016 at 07:42:56PM -0600, Jason Gunthorpe wrote: > > > > On Sun, Oct 09,

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

2016-10-09 Thread Jarkko Sakkinen
On Sun, Oct 09, 2016 at 10:49:05AM -0600, Jason Gunthorpe wrote: > On Sun, Oct 09, 2016 at 12:38:18PM +0300, Jarkko Sakkinen wrote: > > On Sat, Oct 08, 2016 at 07:42:56PM -0600, Jason Gunthorpe wrote: > > > On Sun, Oct 09, 2016 at 03:15:09AM +0300, Jarkko Sakkinen wrote: > > > > + ctrl =

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

2016-10-09 Thread Jarkko Sakkinen
On Sun, Oct 09, 2016 at 10:49:05AM -0600, Jason Gunthorpe wrote: > On Sun, Oct 09, 2016 at 12:38:18PM +0300, Jarkko Sakkinen wrote: > > On Sat, Oct 08, 2016 at 07:42:56PM -0600, Jason Gunthorpe wrote: > > > On Sun, Oct 09, 2016 at 03:15:09AM +0300, Jarkko Sakkinen wrote: > > > > + ctrl =

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

2016-10-09 Thread Jarkko Sakkinen
On Sat, Oct 08, 2016 at 07:42:56PM -0600, Jason Gunthorpe wrote: > On Sun, Oct 09, 2016 at 03:15:09AM +0300, Jarkko Sakkinen wrote: > > + ctrl = crb_map_res(dev, priv, _res, buf->control_address, > > + sizeof(struct crb_regs) - > > + offsetof(struct

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

2016-10-08 Thread Jason Gunthorpe
On Sun, Oct 09, 2016 at 03:15:09AM +0300, Jarkko Sakkinen wrote: > + ctrl = crb_map_res(dev, priv, _res, buf->control_address, > +sizeof(struct crb_regs) - > +offsetof(struct crb_regs, ctrl_req)); > + if (IS_ERR(ctrl)) > + return