From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web10.7159.1581766438610047621 for ; Sat, 15 Feb 2020 03:33:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MgSv6jY+; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: mlureau@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581766437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XS3wzzJ8MtN9CVNWStyhyYXvQ+En+1RMIzJQyBlXRkw=; b=MgSv6jY+5SssKqhZgOFTXkQyMI93H8DfULhvdena509/eyGJlwrstmck3L/hvuxdFOXxYZ 9xY17o8UtNtsz0mzFEu4G7xAcUbg/KTwNO8Xwvx/Q5U5z+814+ibS6TTBSBoW1O5LZQHvv VPLDRv8c/fuz97rg0YTZH0oqNf+V/rk= Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-38-bhBlu564P-uC_-BIeNMI4A-1; Sat, 15 Feb 2020 06:33:51 -0500 Received: by mail-oi1-f198.google.com with SMTP id 199so5976999oie.10 for ; Sat, 15 Feb 2020 03:33:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=XS3wzzJ8MtN9CVNWStyhyYXvQ+En+1RMIzJQyBlXRkw=; b=uP2ggPg9ATuFiuvoxmmPrKDBKbWSJW/8NCHGMHM1ewOcqFnF0PalevqUL4RnH/+EAL LqRcXY0+iiWwENWxKKWEvR3T66B2tCUr6zRhex6SIM6A81w5M53CRQrcIk2AQVJivf8i K/y5UIrl4wB2WARY5fJmH9Wn13HczakV5V76LVI9afLm631UW+rMpZSoe6lMfqKjUbuH qOP6u76t6DHFRkJgaJwDS3ZHrWKcamoOD0I6Yd/I2AthU/+I0lOUolwCNXtgfNwBxteT ZLdwqxNVLVwqSgwO4Yz6FBXhvlQKfL1UxX0157UqVf387RYCD/w0e6dnUK720YbUxBFn mruA== X-Gm-Message-State: APjAAAUu19FZL87rsPxAeB8z5nCNfRyrJtlsVb7JnieBgz9fElDSR9p9 QbQImfc4phnpfC1OBUvMrf+T9fwqlHTHKPBehjRcE74TMl8Dih6tVg/LldhLBH+CEoKZTE8pfUc L+Hi/eO7XYTgNwTuCH2DaGEN8ef4RXA== X-Received: by 2002:a05:6830:50:: with SMTP id d16mr5706691otp.166.1581766429767; Sat, 15 Feb 2020 03:33:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwSGG4ZZoejx8Dp13rkh9ahu+yWnxZwaK62xSKKXE0ukdBLkn2QJV9feh8ozDfxgjHuK8dwsK2w+iJYMt2XWs0= X-Received: by 2002:a05:6830:50:: with SMTP id d16mr5706672otp.166.1581766429473; Sat, 15 Feb 2020 03:33:49 -0800 (PST) MIME-Version: 1.0 References: <20200213131222.157700-1-marcandre.lureau@redhat.com> <74D8A39837DF1E4DA445A8C0B3885C503F92D53C@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503F92D53C@shsmsx102.ccr.corp.intel.com> From: mlureau@redhat.com Date: Sat, 15 Feb 2020 12:33:38 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH v2 0/3] Ovmf: enable TPM 1.2 To: edk2-devel-groups-io , jiewen.yao@intel.com Cc: "edk2-devel@lists.01.org" , "stefanb@linux.ibm.com" , "lersek@redhat.com" , "simon.hardy@itdev.co.uk" X-MC-Unique: bhBlu564P-uC_-BIeNMI4A-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Yao On Thu, Feb 13, 2020 at 2:51 PM Yao, Jiewen wrote: > > Hi Lureau > I don=E2=80=99t think we should expose the TPM Interface type via TpmCom= mandLib. > > 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 implementatio= n type. > > To distinguish TPM2.0 or TPM1.2, the standard way is to send startup com= mand. 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 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=C3=A9 Lureau > > Subject: [edk2-devel] [PATCH v2 0/3] Ovmf: enable TPM 1.2 > > > > From: Marc-Andr=C3=A9 Lureau > > > > 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=C3=A9 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 > > > > > > > > >=20 >