From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by mx.groups.io with SMTP id smtpd.web12.4086.1631827081652347957 for ; Thu, 16 Sep 2021 14:18:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ibm.com header.s=pp1 header.b=EuKFVMl7; spf=pass (domain: linux.ibm.com, ip: 148.163.156.1, mailfrom: stefanb@linux.ibm.com) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18GKgKFv035594; Thu, 16 Sep 2021 17:17:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=GdzGTX6Pk9wTLa8Olmsd3bmysMeuedHG3pWdCQiESQw=; b=EuKFVMl7HdfPqWwL/khQVWHvdQSMh5lECJK7pamZxcjDf/4HzD0VNbp9c13FO1wdoDHx JqqJeoji26PDukRSz72VntUf5N1n50buzKHv1zhzHbdW4HgU2xerThaBegHjzdxk7kaU bzReWtox2A7v7D5Hf1pPrvusLcLP9VFVZqOLaG+nz1ssX9k4DY8gMpyiMKT9tVyioSaS nS2fjbcN2PfoV9RtLMivhW6VN94vgS2Z/dMO6t5D+y/uovNxYMteXMTYxepiewlfJS2f dbg/YNF4rwVN07FA/37ipgLgwCUOYO3hB1NQ767APGx/esnHWwT8XPxsVqmv1L6D3apy 4Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3b49k0w8t6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Sep 2021 17:17:58 -0400 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 18GLGGMP031623; Thu, 16 Sep 2021 17:17:57 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 3b49k0w8su-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Sep 2021 17:17:57 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 18GLBIv5006354; Thu, 16 Sep 2021 21:17:56 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03wdc.us.ibm.com with ESMTP id 3b0m3cmmkm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Sep 2021 21:17:56 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 18GLHtEk21561798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Sep 2021 21:17:55 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 422AD136067; Thu, 16 Sep 2021 21:17:55 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B431B136066; Thu, 16 Sep 2021 21:17:54 +0000 (GMT) Received: from sbct-2.pok.ibm.com (unknown [9.47.158.152]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 16 Sep 2021 21:17:54 +0000 (GMT) From: "Stefan Berger" To: devel@edk2.groups.io Cc: marcandre.lureau@redhat.com, kraxel@redhat.com, jiewen.yao@intel.com, ardb+tianocore@kernel.org, leif@nuviainc.com, sami.mujawar@arm.com, Stefan Berger , Stefan Berger Subject: [RFC PATCH 1/3] ArmVirtPkg/TPM: Add a NULL implementation of TpmPlatformHierarchyLib Date: Thu, 16 Sep 2021 17:17:50 -0400 Message-Id: <20210916211752.2714332-2-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210916211752.2714332-1-stefanb@linux.ibm.com> References: <20210916211752.2714332-1-stefanb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: YarLtero5LOwH-sy82UjrHgNPmI0QCZy X-Proofpoint-ORIG-GUID: MWgAwJ6boEL9EsuoSBCsy_ADylHp_E0i X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-16_07,2021-09-16_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 phishscore=0 mlxlogscore=999 spamscore=0 adultscore=0 suspectscore=0 impostorscore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109030001 definitions=main-2109160122 Content-Transfer-Encoding: quoted-printable From: Stefan Berger Add a NULL implementation of the library class TpmPlatformHierarchyLib. Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Signed-off-by: Stefan Berger --- ArmVirtPkg/ArmVirtPkg.dec | 1 + .../Include/Library/TpmPlatformHierarchyLib.h | 27 +++++++++++++++++ .../PeiDxeTpmPlatformHierarchyLib.c | 22 ++++++++++++++ .../PeiDxeTpmPlatformHierarchyLib.inf | 30 +++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 ArmVirtPkg/Include/Library/TpmPlatformHierarchyLib.h create mode 100644 ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/Pe= iDxeTpmPlatformHierarchyLib.c create mode 100644 ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/Pe= iDxeTpmPlatformHierarchyLib.inf diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index 4e4d758015..f3bdca118b 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -27,6 +27,7 @@ =0D [LibraryClasses]=0D ArmVirtMemInfoLib|Include/Library/ArmVirtMemInfoLib.h=0D + TpmPlatformHierarchyLib|Include/Library/TpmPlatformHierarchyLib.h=0D =0D [Guids.common]=0D gArmVirtTokenSpaceGuid =3D { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, 0x6E, 0= x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } }=0D diff --git a/ArmVirtPkg/Include/Library/TpmPlatformHierarchyLib.h b/ArmVirt= Pkg/Include/Library/TpmPlatformHierarchyLib.h new file mode 100644 index 0000000000..8d61a4867b --- /dev/null +++ b/ArmVirtPkg/Include/Library/TpmPlatformHierarchyLib.h @@ -0,0 +1,27 @@ +/** @file=0D + TPM Platform Hierarchy configuration library.=0D +=0D + This library provides functions for customizing the TPM's Platform Hie= rarchy=0D + Authorization Value (platformAuth) and Platform Hierarchy Authorizatio= n=0D + Policy (platformPolicy) can be defined through this function.=0D +=0D +Copyright (c) 2019, Intel Corporation. All rights reserved.
=0D +Copyright (c) Microsoft Corporation.
=0D +SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef TPM_PLATFORM_HIERARCHY_LIB_H_=0D +#define TPM_PLATFORM_HIERARCHY_LIB_H_=0D +=0D +/**=0D + This service will perform the TPM Platform Hierarchy configuration at t= he SmmReadyToLock event.=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +ConfigureTpmPlatformHierarchy (=0D + VOID=0D + );=0D +=0D +#endif=0D diff --git a/ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpm= PlatformHierarchyLib.c b/ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLibNu= ll/PeiDxeTpmPlatformHierarchyLib.c new file mode 100644 index 0000000000..bac1efda63 --- /dev/null +++ b/ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatfor= mHierarchyLib.c @@ -0,0 +1,22 @@ +/** @file=0D + Null TPM Platform Hierarchy configuration library.=0D +=0D + This library provides stub functions for customizing the TPM's Platfor= m Hierarchy.=0D +=0D + Copyright (c) 2021, IBM Corporation.=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#include =0D +=0D +/**=0D + A NULL implementation of ConfigureTpmPlatformHierarchy.=0D +**/=0D +VOID=0D +EFIAPI=0D +ConfigureTpmPlatformHierarchy (=0D + )=0D +{=0D + /* no nothing */=0D +}=0D diff --git a/ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpm= PlatformHierarchyLib.inf b/ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLib= Null/PeiDxeTpmPlatformHierarchyLib.inf new file mode 100644 index 0000000000..4f02818bbc --- /dev/null +++ b/ArmVirtPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatfor= mHierarchyLib.inf @@ -0,0 +1,30 @@ +### @file=0D +# NULL TPM Platform Hierarchy configuration library.=0D +#=0D +# This library provides functions for customizing the TPM's Platform Hie= rarchy=0D +# Authorization Value (platformAuth) and Platform Hierarchy Authorizatio= n=0D +# Policy (platformPolicy) can be defined through this function.=0D +#=0D +# Copyright (c) 2019, Intel Corporation. All rights reserved.
=0D +# Copyright (c) Microsoft Corporation.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +###=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x00010005=0D + BASE_NAME =3D PeiDxeTpmPlatformHierarchyLibNull=0D + FILE_GUID =3D 8947A3F2-BfB4-45EF-968D-5C40C1CE6A58= =0D + MODULE_TYPE =3D PEIM=0D + VERSION_STRING =3D 1.0=0D + LIBRARY_CLASS =3D TpmPlatformHierarchyLib|PEIM DXE_DRIV= ER=0D +=0D +[LibraryClasses]=0D + BaseLib=0D +=0D +[Packages]=0D + MdePkg/MdePkg.dec=0D +=0D +[Sources]=0D + PeiDxeTpmPlatformHierarchyLib.c=0D --=20 2.31.1