From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: "Usyskin, Alexander" <alexander.usyskin@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Subject: Re: [char-misc-next 2/2] mei: send OS type to the FW
Date: Thu, 10 Nov 2016 13:27:34 +0100 [thread overview]
Message-ID: <20161110122734.GB9104@kroah.com> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B54319C9A@hasmsx108.ger.corp.intel.com>
On Thu, Nov 10, 2016 at 12:19:06PM +0000, Winkler, Tomas wrote:
> >
> > On Thu, Nov 10, 2016 at 12:00:29PM +0000, Winkler, Tomas wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
> > > > Sent: Thursday, November 10, 2016 09:23
> > > > To: Winkler, Tomas <tomas.winkler@intel.com>
> > > > Cc: Usyskin, Alexander <alexander.usyskin@intel.com>; linux-
> > > > kernel@vger.kernel.org; Jarkko Sakkinen
> > > > <jarkko.sakkinen@linux.intel.com>
> > > > Subject: Re: [char-misc-next 2/2] mei: send OS type to the FW
> > > >
> > > > On Tue, Nov 08, 2016 at 06:26:09PM +0200, Tomas Winkler wrote:
> > > > > From: Alexander Usyskin <alexander.usyskin@intel.com>
> > > > >
> > > > > Tell the FW that we are running a sane OS and TPM2_ChangeEPS() is
> > > > > supported. This workaround was added to support other broken OS
> > > > > and we need to follow here. The command is sent just once at the boot
> > time.
> > > > >
> > > > > Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > > > > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> > > > > Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> > > > > ---
> > > > > drivers/misc/mei/bus-fixup.c | 98
> > > > > ++++++++++++++++++++++++++++++++++++++++++++
> > > > > 1 file changed, 98 insertions(+)
> > > > >
> > > > > diff --git a/drivers/misc/mei/bus-fixup.c
> > > > > b/drivers/misc/mei/bus-fixup.c index 9e10d86e3887..344a0c99ee44
> > > > > 100644
> > > > > --- a/drivers/misc/mei/bus-fixup.c
> > > > > +++ b/drivers/misc/mei/bus-fixup.c
> > > > > @@ -38,6 +38,9 @@ static const uuid_le mei_nfc_info_guid =
> > > > > MEI_UUID_NFC_INFO; #define MEI_UUID_WD UUID_LE(0x05B79A6F,
> > > > 0x4628, 0x4D7F, \
> > > > > 0x89, 0x9D, 0xA9, 0x15, 0x14, 0xCB, 0x32, 0xAB)
> > > > >
> > > > > +#define MEI_UUID_MKHIF_FIX UUID_LE(0x55213584, 0x9a29, 0x4916, \
> > > > > + 0xba, 0xdf, 0xf, 0xb7, 0xed, 0x68, 0x2a, 0xeb)
> > > > > +
> > > > > #define MEI_UUID_ANY NULL_UUID_LE
> > > > >
> > > > > /**
> > > > > @@ -69,6 +72,100 @@ static void blacklist(struct mei_cl_device *cldev)
> > > > > cldev->do_match = 0;
> > > > > }
> > > > >
> > > > > +#define OSTYPE_LINUX 2
> > > > > +struct mei_os_ver {
> > > > > + u16 build;
> > > > > + u16 reserved1;
> > > >
> > > > Don't you need to specify the endian-type of these (well for build),
> > > > as they get written to hardware?
> > >
> > > This is really x86 stuff only (depends on X86), the device lives in
> > > PCH or SoC, you cannot really plug it into PowerPC. So we are
> > > consciously not using endian-types in the HW interface.
> >
> > Then just mark them all as little endian and be done with it :)
>
> Then I will have to run the leX_to_cpu all over the code, which will
> really do nothing.
It's not "nothing", it is explicitly stating what the hardware expects.
You write code in C for developers, the compiler will make it all go
away, but then the developer knows what is going on here, and it allows
them to understand the logic a lot better.
thanks,
greg k-h
next prev parent reply other threads:[~2016-11-10 12:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 16:26 [char-misc-next 1/2] mei: enable to set the internal flag for client write Tomas Winkler
2016-11-08 16:26 ` [char-misc-next 2/2] mei: send OS type to the FW Tomas Winkler
2016-11-08 16:32 ` Jarkko Sakkinen
2016-11-10 7:22 ` Greg Kroah-Hartman
2016-11-10 12:00 ` Winkler, Tomas
2016-11-10 12:14 ` Greg Kroah-Hartman
2016-11-10 12:19 ` Winkler, Tomas
2016-11-10 12:27 ` Greg Kroah-Hartman [this message]
2016-11-10 13:00 ` Winkler, Tomas
2016-11-10 13:15 ` Greg Kroah-Hartman
2016-11-10 7:24 ` Greg Kroah-Hartman
2016-11-10 12:13 ` Winkler, Tomas
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=20161110122734.GB9104@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexander.usyskin@intel.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tomas.winkler@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.