public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: mlureau@redhat.com
To: edk2-devel-groups-io <devel@edk2.groups.io>, jiewen.yao@intel.com
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	 "stefanb@linux.ibm.com" <stefanb@linux.ibm.com>,
	"lersek@redhat.com" <lersek@redhat.com>,
	 "simon.hardy@itdev.co.uk" <simon.hardy@itdev.co.uk>
Subject: Re: [edk2-devel] [PATCH v2 0/3] Ovmf: enable TPM 1.2
Date: Sat, 15 Feb 2020 12:33:38 +0100	[thread overview]
Message-ID: <CAMxuvaw1Cr5+JF9gZxcM9Oee=Pp_7HBVpG55dnEx6WkBq=HyjA@mail.gmail.com> (raw)
In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503F92D53C@shsmsx102.ccr.corp.intel.com>

Hi Yao

On Thu, Feb 13, 2020 at 2:51 PM Yao, Jiewen <jiewen.yao@intel.com> wrote:
>
> Hi Lureau
> I don’t think we should expose the TPM Interface type via TpmCommandLib.
>
> That is the TPM device implementation. The TPM device might use TIS/FIFO/CRB, but there might be also other type such as I2C, or fTPM implementation type.
>
> To distinguish TPM2.0 or TPM1.2, the standard way is to send startup command.

Thanks for the feedback, unfortunately I don't know how to achieve
this for both tpm/vtpm (uninitialized) & passthrough (initialized).

If the device is uninitialized, sending Tpm12Startup (TPM_ST_CLEAR) to
detect 1.2 in Tcg2ConfigPeimEntryPoint will work, but then
Tpm12Startup () in TcgPei:PeimEntryMA will later fail.

If the device is initialized/passthrough, sending Tpm12Startup
(TPM_ST_CLEAR) will fail, so it could send Tpm12Startup (TPM_ST_STATE)
instead. But that will fail to detect uninitialized 1.2 device.

I am stuck, any help welcome!

thanks

>
> Thank you
> Yao Jiewen
>
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > marcandre.lureau@redhat.com
> > Sent: Thursday, February 13, 2020 9:12 PM
> > To: edk2-devel@lists.01.org; devel@edk2.groups.io
> > Cc: stefanb@linux.ibm.com; lersek@redhat.com; simon.hardy@itdev.co.uk;
> > Marc-André Lureau <marcandre.lureau@redhat.com>
> > Subject: [edk2-devel] [PATCH v2 0/3] Ovmf: enable TPM 1.2
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Hi,
> >
> > The following patches add basic TPM 1.2 support for Ovmf/QEMU.
> >
> > I tested successfully Win10 with TIS/TPM 1.2 & CRB/TPM 2.0
> > passthrough, and emulated CRB/TPM 2.0.
> > (fwiw, I haven't tried to enable TPM_CONFIG_ENABLE)
> >
> > Marc-André Lureau (3):
> >   Ovmf: rename TPM2 config prefix to TPM
> >   SecurityPkg: export Tpm12GetPtpInterfaceType()
> >   Ovmf: enable TPM 1.2 support
> >
> >  OvmfPkg/OvmfPkgIa32.dsc                       | 39 +++++++++++++------
> >  OvmfPkg/OvmfPkgIa32.fdf                       | 10 +++--
> >  OvmfPkg/OvmfPkgIa32X64.dsc                    | 39 +++++++++++++------
> >  OvmfPkg/OvmfPkgIa32X64.fdf                    | 10 +++--
> >  OvmfPkg/OvmfPkgX64.dsc                        | 39 +++++++++++++------
> >  OvmfPkg/OvmfPkgX64.fdf                        | 10 +++--
> >  OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf      |  3 ++
> >  OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c       | 17 +++++++-
> >  SecurityPkg/Include/Library/Tpm12DeviceLib.h  | 13 +++++++
> >  .../Library/Tpm12DeviceLibDTpm/Tpm12Tis.c     | 17 ++++----
> >  10 files changed, 141 insertions(+), 56 deletions(-)
> >
> > --
> > 2.25.0.rc2.1.g09a9a1a997
> >
> >
> >
>
>
> 
>


  reply	other threads:[~2020-02-15 11:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 13:12 [PATCH v2 0/3] Ovmf: enable TPM 1.2 marcandre.lureau
2020-02-13 13:12 ` [PATCH v2 1/3] Ovmf: rename TPM2 config prefix to TPM marcandre.lureau
2020-02-14 18:20   ` [edk2-devel] " Laszlo Ersek
2020-02-13 13:12 ` [PATCH v2 2/3] SecurityPkg: export Tpm12GetPtpInterfaceType() marcandre.lureau
2020-02-13 13:12 ` [PATCH v2 3/3] Ovmf: enable TPM 1.2 support marcandre.lureau
2020-02-14 19:47   ` [edk2-devel] " Laszlo Ersek
2020-02-13 13:50 ` [edk2-devel] [PATCH v2 0/3] Ovmf: enable TPM 1.2 Yao, Jiewen
2020-02-15 11:33   ` mlureau [this message]
2020-02-15 12:09     ` Yao, Jiewen
2020-02-16 18:54     ` Stefan Berger

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-list 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='CAMxuvaw1Cr5+JF9gZxcM9Oee=Pp_7HBVpG55dnEx6WkBq=HyjA@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /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