Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540489

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

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers
Date 2016-12-12 19:00 +0100
Message-ID <sND3j-7j0-17@gated-at.bofh.it> (permalink)
References (2 earlier) <sNzM6-5s8-7@gated-at.bofh.it> <sNAI9-61i-27@gated-at.bofh.it> <sNARQ-64o-9@gated-at.bofh.it> <sNBbc-6b6-3@gated-at.bofh.it> <sND3j-7j0-19@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Mon, Dec 12, 2016 at 07:53:06PM +0200, Jarkko Sakkinen wrote:
> On Mon, Dec 12, 2016 at 03:57:54PM +0000, Winkler, Tomas wrote:
> > > > On Mon, Dec 12, 2016 at 02:25:32PM +0000, 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 control area.
> > > > > >
> > > > > > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > > > > ---
> > > > > >  drivers/char/tpm/tpm_crb.c | 89
> > > > > > +++++++++++++++++++++++++++++------------
> > > > > > -----
> > > > > >  1 file changed, 57 insertions(+), 32 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/char/tpm/tpm_crb.c
> > > > > > b/drivers/char/tpm/tpm_crb.c index
> > > > > > 717b6b4..80b9759 100644
> > > > > > --- a/drivers/char/tpm/tpm_crb.c
> > > > > > +++ b/drivers/char/tpm/tpm_crb.c
> > > > > > @@ -52,18 +52,28 @@ enum crb_cancel {
> > > > > >  	CRB_CANCEL_INVOKE	= BIT(0),
> > > > > >  };
> > > > > >
> > > > > > -struct crb_control_area {
> > > > > > -	u32 req;
> > > > > > -	u32 sts;
> > > > > > -	u32 cancel;
> > > > > > -	u32 start;
> > > > > > -	u32 int_enable;
> > > > > > -	u32 int_sts;
> > > > > > -	u32 cmd_size;
> > > > > > -	u32 cmd_pa_low;
> > > > > > -	u32 cmd_pa_high;
> > > > > > -	u32 rsp_size;
> > > > > > -	u64 rsp_pa;
> > > > > > +struct crb_regs_head {
> > > > > > +	u32 loc_state;
> > > > > > +	u32 reserved1;
> > > > > > +	u32 loc_ctrl;
> > > > > > +	u32 loc_sts;
> > > > > > +	u8 reserved2[32];
> > > > > > +	u64 intf_id;
> > > > > > +	u64 ctrl_ext;
> > > > > > +} __packed;
> > > > > > +
> > > > >
> > > > > > +struct crb_regs_tail {
> > > > > Why to change the name this is still control_area
> > > 
> > > And how would you name struct crb_regs_h then?
> > 
> > Just crb_regs
> >  
> > > In my opinion PC it makes a lot of sense to speak about registers here rather
> > > than control area now that it is extended to the full range. The PC Client
> > > Specification also speaks about registers.
> > 
> > Right so crb_regs is to be and the nonstandard implementation of the
> > legacy platforms should be even factored out.
> 
> I do not see that we would stop supporting pre-Skylake platforms in the
> near future so probably won't be factored out.

s/near/forseeable/

/Jarkko

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/3] tpm_crb: map locality registers Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-07 13:00 +0100
  RE: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-12-12 15:30 +0100
    RE: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-12-12 16:30 +0100
      Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-12 18:50 +0100
    Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-12 16:30 +0100
      Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-12 16:40 +0100
      Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-12 16:40 +0100
        RE: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-12-12 17:00 +0100
          Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-12 19:00 +0100
          Re: [tpmdd-devel] [PATCH v3 1/3] tpm_crb: map locality registers Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-12-12 19:00 +0100

csiph-web