From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.22474.1628776219637308009 for ; Thu, 12 Aug 2021 06:50:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OMbDtohU; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: mlureau@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628776218; 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: in-reply-to:in-reply-to:references:references; bh=2uJRZW8q/MOnUe0LwtitdPPzKIGdRWUr1RDRpsFUU38=; b=OMbDtohUFrG1x22z7hAgxgpRe50C3/i3e7MM03WCNih5/sSUFqykJFbAXc/SGuX2BFS+Gg Ia6ypbwvnkSBKrNtCOTyCUm0ok+HqBk/oAvYeRFJkMFpxPW2IeQ/SI/2qQfv6hmVHj9rAg JPk6y3DJacC+uupXU9uI0MVdddY2GU0= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-410-uYlM4st4P6yv5HlaIH8PhQ-1; Thu, 12 Aug 2021 09:50:15 -0400 X-MC-Unique: uYlM4st4P6yv5HlaIH8PhQ-1 Received: by mail-pj1-f70.google.com with SMTP id h21-20020a17090adb95b029017797967ffbso5102791pjv.5 for ; Thu, 12 Aug 2021 06:50:14 -0700 (PDT) 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; bh=2uJRZW8q/MOnUe0LwtitdPPzKIGdRWUr1RDRpsFUU38=; b=Dw9vUe85/cveg9KUM0tvXqKh4WJYulyrAxGJwYrL0abr6kPqLkBgB1gBQ5ISY3XNdJ bU2Vf6JVUGa5+SjFjajLQmRvd9SepH3lXgidqjlY5zMI1QekG2eEgNDBRvgecVwX6QIR xmM/wS1kWf3pQb6PWY3AM1o7FSld4fKfQzXQXVyLH3pFtGR73tKbEI7bNPFACIloaGh0 yLM15AjH1vFoO1P2D2ZCpW6jVktVqc6Q9gPbooEKf/udVfhFMaEYFzI+uKUjyMJh7XBO AqNxtEkrQVJClCSrLaArV0ktvdqKAUH7p3KuLXf0IoenQLDYKMiFqrJv9Sbndg6x+KDN 6swQ== X-Gm-Message-State: AOAM532t+ujYyoxYH5K5rv/SgZnNwUsmGKIwovn3m8ErO42xv6sqhYUV /tyGNQKoEP1uDZci6kW7SBcuJqRi2gfguzEK2v5cSL8r9J0E8ieeqkMwLND9orjGscaH4ekIHBD HSVcyzUf+Z7P/+LyiRbg5vCziKsiTjQ== X-Received: by 2002:aa7:8a56:0:b029:3c3:4df9:7370 with SMTP id n22-20020aa78a560000b02903c34df97370mr4370831pfa.42.1628776213912; Thu, 12 Aug 2021 06:50:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhUlrAeWVA2nz8ljaxEe/Y3mMZj/U46qXzJrO9eM7eIoz8FsgNu4NRhOQeinwCUGMPtHxfbosTZqLCy83/TuE= X-Received: by 2002:aa7:8a56:0:b029:3c3:4df9:7370 with SMTP id n22-20020aa78a560000b02903c34df97370mr4370812pfa.42.1628776213707; Thu, 12 Aug 2021 06:50:13 -0700 (PDT) MIME-Version: 1.0 References: <20210810172029.4166819-1-stefanb@linux.vnet.ibm.com> <20210810172029.4166819-3-stefanb@linux.vnet.ibm.com> In-Reply-To: <20210810172029.4166819-3-stefanb@linux.vnet.ibm.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Thu, 12 Aug 2021 17:50:02 +0400 Message-ID: Subject: Re: [PATCH v3 2/6] OvmfPkg/TPM: Add a NULL implementation of TpmPlatformHierarchyLib To: Stefan Berger Cc: edk2-devel-groups-io , jiewen.yao@intel.com, Laszlo Ersek , dick_wilkins@phoenix.com, James.Bottomley@hansenpartnership.com, Stefan Berger Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mlureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/alternative; boundary="000000000000a3131e05c95d0327" --000000000000a3131e05c95d0327 Content-Type: text/plain; charset="UTF-8" Hi On Tue, Aug 10, 2021 at 9:20 PM Stefan Berger wrote: > Add a NULL implementation of the library class TpmPlatformHierarchyLib > > Signed-off-by: Stefan Berger > This patch doesn't pass BaseTools/Scripts/PatchCheck.py --- > .../PeiDxeTpmPlatformHierarchyLib.c | 19 ++++++++++++ > .../PeiDxeTpmPlatformHierarchyLib.inf | 31 +++++++++++++++++++ > 2 files changed, 50 insertions(+) > create mode 100644 > OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.c > create mode 100644 > OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf > > diff --git > a/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.c > b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.c > new file mode 100644 > index 0000000000..a4d38a1465 > --- /dev/null > +++ > b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.c > @@ -0,0 +1,19 @@ > +/** @file > + Null TPM Platform Hierarchy configuration library. > + > + This library provides stub functions for customizing the TPM's > Platform Hierarchy. > + > + Copyright (c) 2021, IBM Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +VOID > +EFIAPI > +ConfigureTpmPlatformHierarchy ( > + ) > +{ > + /* no nothing */ > +} > diff --git > a/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf > b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf > new file mode 100644 > index 0000000000..f0c474d57c > --- /dev/null > +++ > b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf > @@ -0,0 +1,31 @@ > +### @file > +# > +# TPM Platform Hierarchy configuration library. > +# > +# This library provides functions for customizing the TPM's Platform > Hierarchy > +# Authorization Value (platformAuth) and Platform Hierarchy > Authorization > +# 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 > +# > +### > + > +[Defines] > + INF_VERSION = 0x00010005 > + BASE_NAME = PeiDxeTpmPlatformHierarchyLibNull > + FILE_GUID = 7794F92C-4E8E-4E57-9E4A-49A0764C7D73 > Looking at other files, I think it must be unique. (don't ask me why though) + MODULE_TYPE = PEIM > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = TpmPlatformHierarchyLib|PEIM DXE_DRIVER > + > +[LibraryClasses] > + BaseLib > + > +[Packages] > + MdePkg/MdePkg.dec > + > +[Sources] > + PeiDxeTpmPlatformHierarchyLib.c > -- > 2.31.1 > > --000000000000a3131e05c95d0327 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Tue, Aug 10, 2021 at 9:20 PM Ste= fan Berger <stefanb@linux.= vnet.ibm.com> wrote:
Add a NULL implementation of the library class TpmPlatformHiera= rchyLib

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

This patch doesn't pass BaseTools/Scripts/PatchCheck.py

---
=C2=A0.../PeiDxeTpmPlatformHierarchyLib.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0| 19 ++++++++++++
=C2=A0.../PeiDxeTpmPlatformHierarchyLib.inf=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0| 31 +++++++++++++++++++
=C2=A02 files changed, 50 insertions(+)
=C2=A0create mode 100644 OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/= PeiDxeTpmPlatformHierarchyLib.c
=C2=A0create mode 100644 OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/= PeiDxeTpmPlatformHierarchyLib.inf

diff --git a/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPla= tformHierarchyLib.c b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/Pei= DxeTpmPlatformHierarchyLib.c
new file mode 100644
index 0000000000..a4d38a1465
--- /dev/null
+++ b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHi= erarchyLib.c
@@ -0,0 +1,19 @@
+/** @file
+=C2=A0 =C2=A0 Null TPM Platform Hierarchy configuration library.
+
+=C2=A0 =C2=A0 This library provides stub functions for customizing the TPM= 's Platform Hierarchy.
+
+=C2=A0 =C2=A0 Copyright (c) 2021, IBM Corporation.
+=C2=A0 =C2=A0 SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Uefi.h>
+
+VOID
+EFIAPI
+ConfigureTpmPlatformHierarchy (
+=C2=A0 )
+{
+=C2=A0 /* no nothing */
+}
diff --git a/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPla= tformHierarchyLib.inf b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/P= eiDxeTpmPlatformHierarchyLib.inf
new file mode 100644
index 0000000000..f0c474d57c
--- /dev/null
+++ b/OvmfPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHi= erarchyLib.inf
@@ -0,0 +1,31 @@
+### @file
+#
+#=C2=A0 =C2=A0TPM Platform Hierarchy configuration library.
+#
+#=C2=A0 =C2=A0This library provides functions for customizing the TPM'= s Platform Hierarchy
+#=C2=A0 =C2=A0Authorization Value (platformAuth) and Platform Hierarchy Au= thorization
+#=C2=A0 =C2=A0Policy (platformPolicy) can be defined through this function= .
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> +# Copyright (c) Microsoft Corporation.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+###
+
+[Defines]
+=C2=A0 INF_VERSION=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =3D 0x00010005
+=C2=A0 BASE_NAME=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D PeiDxeTpmPlatformHierarchyLibNull
+=C2=A0 FILE_GUID=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D 7794F92C-4E8E-4E57-9E4A-49A0764C7D73

Looking at other files, I think it must be unique. (= don't ask me why though)

+=C2=A0 MODULE_TYPE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =3D PEIM
+=C2=A0 VERSION_STRING=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0=3D 1.0
+=C2=A0 LIBRARY_CLASS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =3D TpmPlatformHierarchyLib|PEIM DXE_DRIVER
+
+[LibraryClasses]
+=C2=A0 BaseLib
+
+[Packages]
+=C2=A0 MdePkg/MdePkg.dec
+
+[Sources]
+=C2=A0 PeiDxeTpmPlatformHierarchyLib.c
--
2.31.1

--000000000000a3131e05c95d0327--