From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 59A67220C2A4D for ; Fri, 9 Mar 2018 08:28:49 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F4ED406E8C3; Fri, 9 Mar 2018 16:35:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-125-183.rdu2.redhat.com [10.10.125.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6119215CDAA; Fri, 9 Mar 2018 16:35:01 +0000 (UTC) To: marcandre.lureau@redhat.com, edk2-devel@lists.01.org Cc: pjones@redhat.com, jiewen.yao@intel.com, stefanb@linux.vnet.ibm.com, qemu-devel@nongnu.org, javierm@redhat.com References: <20180309130918.734-1-marcandre.lureau@redhat.com> <20180309130918.734-5-marcandre.lureau@redhat.com> From: Laszlo Ersek Message-ID: Date: Fri, 9 Mar 2018 17:35:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180309130918.734-5-marcandre.lureau@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 09 Mar 2018 16:35:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 09 Mar 2018 16:35:06 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH v3 4/7] OvmfPkg: add customized Tcg2ConfigPei clone X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2018 16:28:50 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 03/09/18 14:09, marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau > > The Tcg2ConfigPei module informs the firmware globally about the TPM > device type, by setting the PcdTpmInstanceGuid PCD to the appropriate > GUID value. The original module under SecurityPkg can perform device > detection, or read a cached value from a non-volatile UEFI variable. > > OvmfPkg's clone of the module only performs the TPM2 hardware detection. > > This is what the module does: > > - Check the QEMU hardware for TPM2 availability only > > - If found, set the dynamic PCD "PcdTpmInstanceGuid" to > &gEfiTpmDeviceInstanceTpm20DtpmGuid. This is what informs the rest of > the firmware about the TPM type. > > - Install the gEfiTpmDeviceSelectedGuid PPI. This action permits the > PEI_CORE to dispatch the Tcg2Pei module, which consumes the above PCD. > In effect, the gEfiTpmDeviceSelectedGuid PPI serializes the setting > and the consumption of the "TPM type" PCD. > > - If no TPM2 was found, install gPeiTpmInitializationDonePpiGuid. > (Normally this is performed by Tcg2Pei, but Tcg2Pei doesn't do it if > no TPM2 is available. So in that case our Tcg2ConfigPei must do it.) > > Cc: Laszlo Ersek > Cc: Stefan Berger > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Marc-André Lureau > --- > OvmfPkg/OvmfPkgIa32.dsc | 17 +++++ > OvmfPkg/OvmfPkgIa32.fdf | 4 ++ > OvmfPkg/OvmfPkgIa32X64.dsc | 17 +++++ > OvmfPkg/OvmfPkgIa32X64.fdf | 4 ++ > OvmfPkg/OvmfPkgX64.dsc | 17 +++++ > OvmfPkg/OvmfPkgX64.fdf | 4 ++ > OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 53 +++++++++++++++ > OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 84 ++++++++++++++++++++++++ > 8 files changed, 200 insertions(+) > create mode 100644 OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf > create mode 100644 OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c Nice! Reviewed-by: Laszlo Ersek