mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Peter Huewe <PeterHuewe@gmx.de>
Cc: "moderated list:TPM DEVICE DRIVER" 
	<tpmdd-devel@lists.sourceforge.net>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [tpmdd-devel] [PATCH] tpm, tpm_crb: migrate to struct acpi_table_tpm2 and acpi_tpm2_control
Date: Tue, 9 Jun 2015 12:14:00 +0300	[thread overview]
Message-ID: <20150609091400.GA4968@jsakkine-mobl1> (raw)
In-Reply-To: <20150608115435.GA19358@jsakkine-mobl1>

On Mon, Jun 08, 2015 at 02:54:35PM +0300, Jarkko Sakkinen wrote:
> Hi
> 
> I somehow missed your reply to this last week.
> 
> On Tue, Jun 02, 2015 at 04:00:37PM +0200, Peter Huewe wrote:
> > Hi
> > >Betreff: [PATCH] tpm, tpm_crb: migrate to struct acpi_table_tpm2 and acpi_tpm2_control
> > > Migrate to struct acpi_table_tpm2 and struct acpi_tpm2_control defined
> > > in include/acpi/actbl3.h from the internal structures.
> > 
> > I definitely do like the idea! Thanks for spotting this!
> > 
> > However one small remark
> > > -struct crb_control_area {
> > > - u32 req;
> > > - u32 sts;
> > > - u32 cancel;
> > > - u32 start;
> > > - u32 int_enable;
> > > - u32 int_sts;
> > > - u32 cmd_size;
> > > - u64 cmd_pa;
> > > - u32 rsp_size;
> > > - u64 rsp_pa;
> > > -} __packed;
> > > -
> > > 
> > > - if (le32_to_cpu(ioread32(&priv->cca->sts)) & CRB_CA_STS_ERROR)
> > > + if (le32_to_cpu(ioread32(&priv->ctl->error)) & CRB_CA_STS_ERROR)
> > > return -EIO;
> > 
> > I know the fields are described in include/acpi/actbl3.h as 
> > +struct acpi_tpm2_control {
> > +	u32 reserved;
> > +	u32 error;
> > +	u32 cancel;
> > +	u32 start;
> > +	u64 interrupt_control;
> > +	u32 command_size;
> > +	u64 command_address;
> > +	u32 response_size;
> > +	u64 response_address;
> > +};
> > 
> > but are the names there still correct? Isn't this information outdated?
> > The acpi spec refers to the MS spec which is not present anymore, and MS refers to the TCG -- and in the PTP your names are used.
> > 
> > ---> We should update the ACPI header? 
> > At least the naming for reserved and error.
> > What do you think?
> 
> I think you are right. It does not make sense to degrade here. I'll
> prepare "CRB fixes" patch set and also include a workaround for this
> bug:
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=98181
> 
> See my last comment.

Some rethinking after sending this email.

I implement and submit the bug as a separate item as these are
unrelated issues.

I think the control area should not be in the ACPI headers in the
first place as it is not defined TCG ACPI Specification.

/Jarkko

  reply	other threads:[~2015-06-09  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 15:57 Jarkko Sakkinen
2015-06-02 14:00 ` Aw: " Peter Huewe
2015-06-08 11:54   ` Jarkko Sakkinen
2015-06-09  9:14     ` Jarkko Sakkinen [this message]
2015-06-16 20:46       ` [tpmdd-devel] " Peter Hüwe
2015-06-22 13:04         ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150609091400.GA4968@jsakkine-mobl1 \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=PeterHuewe@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®