From nobody Fri Dec 19 20:15:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76143+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76143+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1623081931; cv=none; d=zohomail.com; s=zohoarc; b=Up+nxlVm0yyHGWA5trPg4v5Ao7PuwjCypMfK3xOJmULtdTUwdp/jKpv2W0chordfDXIiOzqbN1bxMdVgW8zXng1pw+z8Aw3UOtQhCC3GIW2+vZ/LAgM7ZB1WPJMSHiMBkjIcIfjP6ThI/1C1cY0jZyeOc7bgtrVFkZxPXUPsyJI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623081931; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=TAcHZlXuj++GtavWV9Sc+W7YAtGgwtLnJsnNnBh3QeU=; b=FvNvgnIJqNQ/rcGm2CKVRF54b5Bfd8jc//0v4DkMSVveBCfJyzROAxtMlZeKGSGyVXb8/2QNDpXuc9zNInZdh6SLvoNcsto3XrBww61+I0ifF14uGvQCl5GWDzNkw7TvwecrAU/sm2s57lQkSI3/1dJuOqgTAppzog2BwJXU36M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76143+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623081931964805.4004499121708; Mon, 7 Jun 2021 09:05:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id sTMdYY1788612x7dTCGPdcdE; Mon, 07 Jun 2021 09:05:31 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.439.1623081930953881743 for ; Mon, 07 Jun 2021 09:05:31 -0700 X-Received: from localhost.localdomain (unknown [167.220.2.74]) by linux.microsoft.com (Postfix) with ESMTPSA id 8F75F20B83EA; Mon, 7 Jun 2021 09:05:30 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8F75F20B83EA From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [edk2-platforms][PATCH v2 2/4] MinPlatformPkg/TpmPlatformHierarchyLib: Add PEI support Date: Mon, 7 Jun 2021 12:05:04 -0400 Message-Id: <20210607160506.2411-3-mikuback@linux.microsoft.com> In-Reply-To: <20210607160506.2411-1-mikuback@linux.microsoft.com> References: <20210607160506.2411-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mikuback@linux.microsoft.com X-Gm-Message-State: nX94WxQhfeRpVAZ1M4vGSqSFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623081931; bh=1juPsZoak8L8jQulDKGsXamFTyAX9j0mp660xCc5dQY=; h=Cc:Date:From:Reply-To:Subject:To; b=jLQr4PZRt3AmCz049IU15IUpaRF4nSkioE9bt6/1bL2tfTM8lH+n4wCl15H4Tq5Zp5x s7+KpIIOV+sRQ30KrCIvdGXupN9MdT0pJjuqPzCOe3V6UDZpJiyl4OP6INpwPEYETP2p4 imIHQlAeLIEQXrBmMua5cmn0R4dtMeqicYA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Michael Kubacki Expands the TpmPlatformHierarchyLib instance in MinPlatformPkg to support PEIM in addition to DXE_DRIVER. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Tcg/Library/{TpmPlatformHierarchyLib/TpmPlat= formHierarchyLib.c =3D> PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHier= archyLib.c} | 9 +++------ Platform/Intel/MinPlatformPkg/Include/Library/TpmPlatformHierarchyLib.h = = | 4 +--- Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = = | 4 ++-- Platform/Intel/MinPlatformPkg/Tcg/Library/{TpmPlatformHierarchyLib/TpmPlat= formHierarchyLib.inf =3D> PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHi= erarchyLib.inf} | 20 +++++++------------- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Tcg/Library/TpmPlatformHierarchy= Lib/TpmPlatformHierarchyLib.c b/Platform/Intel/MinPlatformPkg/Tcg/Library/P= eiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.c similarity index 93% rename from Platform/Intel/MinPlatformPkg/Tcg/Library/TpmPlatformHierarchyL= ib/TpmPlatformHierarchyLib.c rename to Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierar= chyLib/PeiDxeTpmPlatformHierarchyLib.c index 41ddb26f4046..fa590089f0a0 100644 --- a/Platform/Intel/MinPlatformPkg/Tcg/Library/TpmPlatformHierarchyLib/Tpm= PlatformHierarchyLib.c +++ b/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyL= ib/PeiDxeTpmPlatformHierarchyLib.c @@ -12,16 +12,13 @@ https://trustedcomputinggroup.org/resource/tcg-tpm-v2-0-provisioning-g= uidance/ **/ =20 -#include +#include =20 -#include #include -#include +#include #include -#include #include -#include -#include +#include =20 // // The authorization value may be no larger than the digest produced by th= e hash diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/TpmPlatformHiera= rchyLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/TpmPlatformHierar= chyLib.h index ed9709b24a73..a872fa09dc6a 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Library/TpmPlatformHierarchyLib= .h +++ b/Platform/Intel/MinPlatformPkg/Include/Library/TpmPlatformHierarchyLib= .h @@ -6,6 +6,7 @@ Policy (platformPolicy) can be defined through this function. =20 Copyright (c) 2019, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -13,9 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _TPM_PLATFORM_HIERARCHY_LIB_H_ #define _TPM_PLATFORM_HIERARCHY_LIB_H_ =20 -#include -#include - /** This service will perform the TPM Platform Hierarchy configuration at t= he SmmReadyToLock event. =20 diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dsc index 7e952dfaf300..0240a803f868 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -106,7 +106,7 @@ [LibraryClasses.common.DXE_DRIVER] FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/DxeFspWrapperPla= tformLib/DxeFspWrapperPlatformLib.inf TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointLib.inf - TpmPlatformHierarchyLib|MinPlatformPkg/Tcg/Library/TpmPlatformHierarchyL= ib/TpmPlatformHierarchyLib.inf + TpmPlatformHierarchyLib|MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHier= archyLib/PeiDxeTpmPlatformHierarchyLib.inf =20 [LibraryClasses.common.DXE_SMM_DRIVER] SpiFlashCommonLib|MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/Spi= FlashCommonLibNull.inf @@ -200,7 +200,7 @@ [Components] MinPlatformPkg/Test/TestPointStubDxe/TestPointStubDxe.inf MinPlatformPkg/Test/TestPointDumpApp/TestPointDumpApp.inf =20 - MinPlatformPkg/Tcg/Library/TpmPlatformHierarchyLib/TpmPlatformHierarchyL= ib.inf + MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatfo= rmHierarchyLib.inf !if gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable =3D=3D TRUE MinPlatformPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf MinPlatformPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.inf diff --git a/Platform/Intel/MinPlatformPkg/Tcg/Library/TpmPlatformHierarchy= Lib/TpmPlatformHierarchyLib.inf b/Platform/Intel/MinPlatformPkg/Tcg/Library= /PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf similarity index 70% rename from Platform/Intel/MinPlatformPkg/Tcg/Library/TpmPlatformHierarchyL= ib/TpmPlatformHierarchyLib.inf rename to Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierar= chyLib/PeiDxeTpmPlatformHierarchyLib.inf index 0911bdffa01f..7165cda31357 100644 --- a/Platform/Intel/MinPlatformPkg/Tcg/Library/TpmPlatformHierarchyLib/Tpm= PlatformHierarchyLib.inf +++ b/Platform/Intel/MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyL= ib/PeiDxeTpmPlatformHierarchyLib.inf @@ -7,6 +7,7 @@ # Policy (platformPolicy) can be defined through this function. # # Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -14,23 +15,19 @@ =20 [Defines] INF_VERSION =3D 0x00010005 - BASE_NAME =3D TpmPlatformHierarchyLib + BASE_NAME =3D PeiDxeTpmPlatformHierarchyLib FILE_GUID =3D 7794F92C-4E8E-4E57-9E4A-49A0764C7D73 - MODULE_TYPE =3D DXE_DRIVER + MODULE_TYPE =3D PEIM VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D TpmPlatformHierarchyLib + LIBRARY_CLASS =3D TpmPlatformHierarchyLib|PEIM DXE_DRIV= ER =20 [LibraryClasses] - MemoryAllocationLib BaseLib - UefiBootServicesTableLib - UefiDriverEntryPoint BaseMemoryLib DebugLib - Tpm2CommandLib - Tpm2DeviceLib + MemoryAllocationLib RngLib - UefiLib + Tpm2CommandLib =20 [Packages] MdePkg/MdePkg.dec @@ -39,7 +36,4 @@ [Packages] CryptoPkg/CryptoPkg.dec =20 [Sources] - TpmPlatformHierarchyLib.c - -[Depex] - gEfiTcg2ProtocolGuid + PeiDxeTpmPlatformHierarchyLib.c --=20 2.28.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76143): https://edk2.groups.io/g/devel/message/76143 Mute This Topic: https://groups.io/mt/83373866/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-