Hi Yao On Thu, Feb 13, 2020 at 2:51 PM Yao, Jiewen <[email protected]> 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: [email protected] <[email protected]> On Behalf Of > > [email protected] > > Sent: Thursday, February 13, 2020 9:12 PM > > To: [email protected]; [email protected] > > Cc: [email protected]; [email protected]; [email protected]; > > Marc-André Lureau <[email protected]> > > Subject: [edk2-devel] [PATCH v2 0/3] Ovmf: enable TPM 1.2 > > > > From: Marc-André Lureau <[email protected]> > > > > 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 > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54501): https://edk2.groups.io/g/devel/message/54501 Mute This Topic: https://groups.io/mt/71240877/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
