From nobody Sun May 5 00:21:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1520625935823679.5475490234859; Fri, 9 Mar 2018 12:05:35 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4A1402253FB66; Fri, 9 Mar 2018 11:59:16 -0800 (PST) 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 C4B482253FB50 for ; Fri, 9 Mar 2018 11:59:14 -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 CA18981A8B7F; Fri, 9 Mar 2018 20:05:31 +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 85A8B2166BAE; Fri, 9 Mar 2018 20:05:30 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; 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 From: Laszlo Ersek To: edk2-devel-01 Date: Fri, 9 Mar 2018 21:05:24 +0100 Message-Id: <20180309200525.27376-2-lersek@redhat.com> In-Reply-To: <20180309200525.27376-1-lersek@redhat.com> References: <20180309200525.27376-1-lersek@redhat.com> MIME-Version: 1.0 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.8]); Fri, 09 Mar 2018 20:05:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 09 Mar 2018 20:05:31 +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: [edk2] [PATCH 1/2] OvmfPkg/Tcg2ConfigPei: trivial coding style updates 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: , Cc: Jordan Justen , Ard Biesheuvel Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 - the @file comment block should match between INF and main C file - rewrap / refill columns to 79 characters - insert space before opening paren - prefix and suffix //-style comment block with empty // lines - fix indentation of arguments in multi-line function call - general tab spacing (indent step) is 2 in edk2, unlike QEMU's 4 No functional changes. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Marc-Andr=C3=A9 Lureau Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 20 +++---- OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 55 +++++++++++--------- 2 files changed, 40 insertions(+), 35 deletions(-) diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Con= fig/Tcg2ConfigPei.inf index 234cdd6cb40c..8c2d5863ea6c 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf @@ -1,20 +1,20 @@ ## @file -# Set TPM device type +# Set TPM device type # -# In SecurityPkg, this module initializes the TPM device type based on -# a UEFI variable and/or hardware detection. In OvmfPkg, the module -# only performs TPM2 hardware detection. +# In SecurityPkg, this module initializes the TPM device type based on a U= EFI +# variable and/or hardware detection. In OvmfPkg, the module only performs= TPM2 +# hardware detection. # # Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
# Copyright (C) 2018, Red Hat, Inc. # -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BS= D License -# which accompanies this distribution. The full text of the license may be= found at +# This program and the accompanying materials are licensed and made availa= ble +# under the terms and conditions of the BSD License which accompanies this +# distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. # +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WI= THOUT +# WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ## =20 [Defines] @@ -40,7 +40,7 @@ [LibraryClasses] Tpm2DeviceLib =20 [Guids] - gEfiTpmDeviceSelectedGuid ## PRODUCES ## GUID #= Used as a PPI GUID + gEfiTpmDeviceSelectedGuid ## PRODUCES ## GUID # Used as a PPI = GUID gEfiTpmDeviceInstanceTpm20DtpmGuid ## SOMETIMES_CONSUMES =20 [Ppis] diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/OvmfPkg/Tcg/Tcg2Conf= ig/Tcg2ConfigPeim.c index 8bee1926b3c4..0befc6c54c87 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c @@ -1,17 +1,20 @@ /** @file - The module entry point for Tcg2 configuration module. + Set TPM device type =20 -Copyright (c) 2018, Red Hat, Inc. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+ In SecurityPkg, this module initializes the TPM device type based on a U= EFI + variable and/or hardware detection. In OvmfPkg, the module only performs= TPM2 + hardware detection. =20 -This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD = License -which accompanies this distribution. The full text of the license may be = found at -http://opensource.org/licenses/bsd-license.php + Copyright (c) 2015, Intel Corporation. All rights reserved.
+ Copyright (C) 2018, Red Hat, Inc. =20 -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLI= ED. + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php =20 + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WI= THOUT + WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ =20 =20 @@ -55,23 +58,25 @@ Tcg2ConfigPeimEntryPoint ( =20 Status =3D Tpm2RequestUseTpm (); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __FUNCTION__)); - Size =3D sizeof(gEfiTpmDeviceInstanceTpm20DtpmGuid); - Status =3D PcdSetPtrS ( - PcdTpmInstanceGuid, - &Size, - &gEfiTpmDeviceInstanceTpm20DtpmGuid - ); - ASSERT_EFI_ERROR (Status); + DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __FUNCTION__)); + Size =3D sizeof (gEfiTpmDeviceInstanceTpm20DtpmGuid); + Status =3D PcdSetPtrS ( + PcdTpmInstanceGuid, + &Size, + &gEfiTpmDeviceInstanceTpm20DtpmGuid + ); + ASSERT_EFI_ERROR (Status); } else { - DEBUG ((DEBUG_INFO, "%a: no TPM2 detected\n", __FUNCTION__)); - // If no TPM2 was detected, we still need to install - // TpmInitializationDonePpi. Namely, Tcg2Pei will exit early upon - // seeing the default (all-bits-zero) contents of - // PcdTpmInstanceGuid, thus we have to install the PPI in its place, - // in order to unblock any dependent PEIMs. - Status =3D PeiServicesInstallPpi (&mTpmInitializationDonePpiList); - ASSERT_EFI_ERROR (Status); + DEBUG ((DEBUG_INFO, "%a: no TPM2 detected\n", __FUNCTION__)); + // + // If no TPM2 was detected, we still need to install + // TpmInitializationDonePpi. Namely, Tcg2Pei will exit early upon seei= ng + // the default (all-bits-zero) contents of PcdTpmInstanceGuid, thus we= have + // to install the PPI in its place, in order to unblock any dependent + // PEIMs. + // + Status =3D PeiServicesInstallPpi (&mTpmInitializationDonePpiList); + ASSERT_EFI_ERROR (Status); } =20 // --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 00:21:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1520625938383874.8208055018273; Fri, 9 Mar 2018 12:05:38 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AC1A62253FB7D; Fri, 9 Mar 2018 11:59:18 -0800 (PST) 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 F309222135D23 for ; Fri, 9 Mar 2018 11:59:15 -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 09E308D77E; Fri, 9 Mar 2018 20:05:33 +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 2D4292166BAE; Fri, 9 Mar 2018 20:05:31 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; 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 From: Laszlo Ersek To: edk2-devel-01 Date: Fri, 9 Mar 2018 21:05:25 +0100 Message-Id: <20180309200525.27376-3-lersek@redhat.com> In-Reply-To: <20180309200525.27376-1-lersek@redhat.com> References: <20180309200525.27376-1-lersek@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.2]); Fri, 09 Mar 2018 20:05:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 09 Mar 2018 20:05:33 +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: [edk2] [PATCH 2/2] SecurityPkg/TcgPei: drop PeiReadOnlyVariable from Depex 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: , Cc: Jiewen Yao , Chao Zhang MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" TcgPei doesn't actually use the PEI-phase read-only variable service, so drop that from the Depex. This patch was inspired by commit ab9e11da6651 ("SecurityPkg/Tcg2Pei: drop PeiReadOnlyVariable from Depex", 2018-03-09). Cc: Chao Zhang Cc: Jiewen Yao Suggested-by: Chao Zhang Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Chao Zhang --- SecurityPkg/Tcg/TcgPei/TcgPei.inf | 1 - 1 file changed, 1 deletion(-) diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.inf b/SecurityPkg/Tcg/TcgPei/Tcg= Pei.inf index 9a44d8fbda51..57ce7263e909 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.inf +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.inf @@ -85,7 +85,6 @@ [Pcd] =20 [Depex] gEfiPeiMasterBootModePpiGuid AND - gEfiPeiReadOnlyVariable2PpiGuid AND gEfiTpmDeviceSelectedGuid =20 [UserExtensions.TianoCore."ExtraFiles"] --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel