public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: "Jiewen Yao" <jiewen.yao@intel.com>,
	"Jordan Justen" <jordan.l.justen@intel.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Min Xu" <min.m.xu@intel.com>,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	"Stefan Berger" <stefanb@linux.ibm.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Ard Biesheuvel" <ardb+tianocore@kernel.org>,
	"Erdem Aktas" <erdemaktas@google.com>,
	"Brijesh Singh" <brijesh.singh@amd.com>,
	"James Bottomley" <jejb@linux.ibm.com>
Subject: [PATCH v3 4/5] OvmfPkg: create Tcg12ConfigPei.inf
Date: Thu, 28 Oct 2021 13:09:20 +0200	[thread overview]
Message-ID: <20211028110921.819113-5-kraxel@redhat.com> (raw)
In-Reply-To: <20211028110921.819113-1-kraxel@redhat.com>

Split Tcg2ConfigPei.inf into two variants: Tcg12ConfigPei.inf with
TPM 1.2 support included and Tcg2ConfigPei.inf supporting TPM 2.0 only.
This allows x86 builds to choose whenever TPM 1.2 support should be
included or not by picking the one or the other inf file.

Switch x86 builds to Tcg12ConfigPei.inf, so they continue to
have TPM 1.2 support.

No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
---
 OvmfPkg/OvmfTpmComponentsPei.dsc.inc                  |  2 +-
 .../{Tcg2ConfigPei.inf => Tcg12ConfigPei.inf}         | 11 ++---------
 OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf              | 11 +----------
 OvmfPkg/OvmfTpmPei.fdf.inc                            |  2 +-
 4 files changed, 5 insertions(+), 21 deletions(-)
 copy OvmfPkg/Tcg/Tcg2Config/{Tcg2ConfigPei.inf => Tcg12ConfigPei.inf} (82%)

diff --git a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc
index 99fa7c13b3e7..87d491da5047 100644
--- a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc
+++ b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc
@@ -4,7 +4,7 @@
 
 !if $(TPM_ENABLE) == TRUE
   OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf
-  OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
+  OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf
   SecurityPkg/Tcg/TcgPei/TcgPei.inf
   SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf {
     <LibraryClasses>
diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf
similarity index 82%
copy from OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
copy to OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf
index 39d1deeed16b..e8e0b88e6058 100644
--- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
+++ b/OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf
@@ -1,5 +1,5 @@
 ## @file
-# Set TPM device type
+# Set TPM device type - supports TPM 1.2 and 2.0
 #
 # In SecurityPkg, this module initializes the TPM device type based on a UEFI
 # variable and/or hardware detection. In OvmfPkg, the module only performs TPM
@@ -14,7 +14,7 @@
 [Defines]
   INF_VERSION                    = 0x00010005
   BASE_NAME                      = Tcg2ConfigPei
-  FILE_GUID                      = BF7F2B0C-9F2F-4889-AB5C-12460022BE87
+  FILE_GUID                      = 8AD3148F-945F-46B4-8ACD-71469EA73945
   MODULE_TYPE                    = PEIM
   VERSION_STRING                 = 1.0
   ENTRY_POINT                    = Tcg2ConfigPeimEntryPoint
@@ -22,13 +22,8 @@ [Defines]
 [Sources]
   Tcg2ConfigPeim.c
   Tpm12Support.h
-
-[Sources.IA32, Sources.X64]
   Tpm12Support.c
 
-[Sources.ARM, Sources.AARCH64]
-  Tpm12SupportNull.c
-
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
@@ -40,8 +35,6 @@ [LibraryClasses]
   DebugLib
   PeiServicesLib
   Tpm2DeviceLib
-
-[LibraryClasses.IA32, LibraryClasses.X64]
   BaseLib
   Tpm12DeviceLib
 
diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
index 39d1deeed16b..51078c981374 100644
--- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
+++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
@@ -1,5 +1,5 @@
 ## @file
-# Set TPM device type
+# Set TPM device type - supports TPM 2.0 only
 #
 # In SecurityPkg, this module initializes the TPM device type based on a UEFI
 # variable and/or hardware detection. In OvmfPkg, the module only performs TPM
@@ -22,11 +22,6 @@ [Defines]
 [Sources]
   Tcg2ConfigPeim.c
   Tpm12Support.h
-
-[Sources.IA32, Sources.X64]
-  Tpm12Support.c
-
-[Sources.ARM, Sources.AARCH64]
   Tpm12SupportNull.c
 
 [Packages]
@@ -41,10 +36,6 @@ [LibraryClasses]
   PeiServicesLib
   Tpm2DeviceLib
 
-[LibraryClasses.IA32, LibraryClasses.X64]
-  BaseLib
-  Tpm12DeviceLib
-
 [Guids]
   gEfiTpmDeviceSelectedGuid           ## PRODUCES ## GUID # Used as a PPI GUID
   gEfiTpmDeviceInstanceTpm20DtpmGuid  ## SOMETIMES_CONSUMES
diff --git a/OvmfPkg/OvmfTpmPei.fdf.inc b/OvmfPkg/OvmfTpmPei.fdf.inc
index 9aefd73d219c..709a608cc3bd 100644
--- a/OvmfPkg/OvmfTpmPei.fdf.inc
+++ b/OvmfPkg/OvmfTpmPei.fdf.inc
@@ -4,7 +4,7 @@
 
 !if $(TPM_ENABLE) == TRUE
 INF  OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPei.inf
-INF  OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
+INF  OvmfPkg/Tcg/Tcg2Config/Tcg12ConfigPei.inf
 INF  SecurityPkg/Tcg/TcgPei/TcgPei.inf
 INF  SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf
 INF  SecurityPkg/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf
-- 
2.31.1


  parent reply	other threads:[~2021-10-28 11:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 11:09 [PATCH v3 0/5] OvmfPkg: rework TPM configuration Gerd Hoffmann
2021-10-28 11:09 ` [PATCH v3 1/5] OvmfPkg: remove unused TPM options from MicrovmX64.dsc Gerd Hoffmann
2021-10-28 11:47   ` [edk2-devel] " Stefan Berger
2021-11-09  8:45   ` Philippe Mathieu-Daudé
2021-10-28 11:09 ` [PATCH v3 2/5] OvmfPkg: move tcg configuration to dsc and fdf include files Gerd Hoffmann
2021-10-28 11:09 ` [PATCH v3 3/5] OvmfPkg: drop TPM_CONFIG_ENABLE Gerd Hoffmann
2021-11-09  8:47   ` [edk2-devel] " Philippe Mathieu-Daudé
2021-10-28 11:09 ` Gerd Hoffmann [this message]
2021-11-09  8:43   ` [edk2-devel] [PATCH v3 4/5] OvmfPkg: create Tcg12ConfigPei.inf Philippe Mathieu-Daudé
2021-10-28 11:09 ` [PATCH v3 5/5] OvmfPkg: rework TPM configuration Gerd Hoffmann
2021-11-09  8:49   ` [edk2-devel] " Philippe Mathieu-Daudé
2021-10-29  0:37 ` [edk2-devel] [PATCH v3 0/5] " Yao, Jiewen
2021-11-09  7:08 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211028110921.819113-5-kraxel@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox