Blame SOURCES/edk2-OvmfPkg-drop-TPM_CONFIG_ENABLE.patch

75d8e7
From 505473655db4b91e4a0ac732069968f9eddabc51 Mon Sep 17 00:00:00 2001
75d8e7
From: Gerd Hoffmann <kraxel@redhat.com>
75d8e7
Date: Wed, 15 Dec 2021 12:39:18 +0100
75d8e7
Subject: [PATCH 3/6] OvmfPkg: drop TPM_CONFIG_ENABLE
75d8e7
75d8e7
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
75d8e7
RH-MergeRequest: 9: backport tpm build updates, disable tpm 1.2 support
75d8e7
RH-Commit: [3/6] be335526f74358d4af21fbd35cc7008b227ebb23 (kraxel/centos-edk2)
75d8e7
RH-Bugzilla: 1935497
75d8e7
RH-Acked-by: Oliver Steffen <None>
75d8e7
75d8e7
Drop TPM_CONFIG_ENABLE config option.  Including TPM support in the
75d8e7
build without also including the TPM configuration menu is not useful.
75d8e7
75d8e7
Suggested-by: Stefan Berger <stefanb@linux.ibm.com>
75d8e7
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
75d8e7
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
75d8e7
(cherry picked from commit 5711ff4d0b56ff4c58dc7a780e706bc58aed2253)
75d8e7
---
75d8e7
 OvmfPkg/OvmfTpmComponentsDxe.dsc.inc                  | 2 --
75d8e7
 OvmfPkg/OvmfTpmDefines.dsc.inc                        | 1 -
75d8e7
 OvmfPkg/OvmfTpmDxe.fdf.inc                            | 2 --
75d8e7
 OvmfPkg/OvmfTpmPcdsHii.dsc.inc                        | 2 +-
75d8e7
 OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml    | 6 +++---
75d8e7
 OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml | 6 +++---
75d8e7
 OvmfPkg/PlatformCI/ReadMe.md                          | 2 +-
75d8e7
 7 files changed, 8 insertions(+), 13 deletions(-)
75d8e7
75d8e7
diff --git a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc b/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc
75d8e7
index d5c2586118..e025d85a58 100644
75d8e7
--- a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc
75d8e7
+++ b/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc
75d8e7
@@ -14,9 +14,7 @@
75d8e7
       NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
75d8e7
       NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
75d8e7
   }
75d8e7
-!if $(TPM_CONFIG_ENABLE) == TRUE
75d8e7
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
75d8e7
-!endif
75d8e7
   SecurityPkg/Tcg/TcgDxe/TcgDxe.inf {
75d8e7
     <LibraryClasses>
75d8e7
       Tpm12DeviceLib|SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.inf
75d8e7
diff --git a/OvmfPkg/OvmfTpmDefines.dsc.inc b/OvmfPkg/OvmfTpmDefines.dsc.inc
75d8e7
index 51da7508b3..5df4a331fb 100644
75d8e7
--- a/OvmfPkg/OvmfTpmDefines.dsc.inc
75d8e7
+++ b/OvmfPkg/OvmfTpmDefines.dsc.inc
75d8e7
@@ -3,4 +3,3 @@
75d8e7
 ##
75d8e7
 
75d8e7
   DEFINE TPM_ENABLE              = FALSE
75d8e7
-  DEFINE TPM_CONFIG_ENABLE       = FALSE
75d8e7
diff --git a/OvmfPkg/OvmfTpmDxe.fdf.inc b/OvmfPkg/OvmfTpmDxe.fdf.inc
75d8e7
index 9dcdaaf01c..32eef24638 100644
75d8e7
--- a/OvmfPkg/OvmfTpmDxe.fdf.inc
75d8e7
+++ b/OvmfPkg/OvmfTpmDxe.fdf.inc
75d8e7
@@ -6,7 +6,5 @@
75d8e7
 INF  SecurityPkg/Tcg/TcgDxe/TcgDxe.inf
75d8e7
 INF  SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
75d8e7
 INF  SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.inf
75d8e7
-!if $(TPM_CONFIG_ENABLE) == TRUE
75d8e7
 INF  SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
75d8e7
 !endif
75d8e7
-!endif
75d8e7
diff --git a/OvmfPkg/OvmfTpmPcdsHii.dsc.inc b/OvmfPkg/OvmfTpmPcdsHii.dsc.inc
75d8e7
index 164bc9c7fc..2e02a5b4cb 100644
75d8e7
--- a/OvmfPkg/OvmfTpmPcdsHii.dsc.inc
75d8e7
+++ b/OvmfPkg/OvmfTpmPcdsHii.dsc.inc
75d8e7
@@ -2,7 +2,7 @@
75d8e7
 #    SPDX-License-Identifier: BSD-2-Clause-Patent
75d8e7
 ##
75d8e7
 
75d8e7
-!if $(TPM_ENABLE) == TRUE && $(TPM_CONFIG_ENABLE) == TRUE
75d8e7
+!if $(TPM_ENABLE) == TRUE
75d8e7
   gEfiSecurityPkgTokenSpaceGuid.PcdTcgPhysicalPresenceInterfaceVer|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x0|"1.3"|NV,BS
75d8e7
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableRev|L"TCG2_VERSION"|gTcg2ConfigFormSetGuid|0x8|3|NV,BS
75d8e7
 !endif
75d8e7
diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
75d8e7
index 7117b86b81..1774423580 100644
75d8e7
--- a/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
75d8e7
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml
75d8e7
@@ -95,21 +95,21 @@ jobs:
75d8e7
           OVMF_IA32X64_FULL_DEBUG:
75d8e7
             Build.File: "$(package)/PlatformCI/PlatformBuild.py"
75d8e7
             Build.Arch: "IA32,X64"
75d8e7
-            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_TPM_CONFIG_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
+            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
             Build.Target: "DEBUG"
75d8e7
             Run.Flags: $(run_flags)
75d8e7
             Run: $(should_run)
75d8e7
           OVMF_IA32X64_FULL_RELEASE:
75d8e7
             Build.File: "$(package)/PlatformCI/PlatformBuild.py"
75d8e7
             Build.Arch: "IA32,X64"
75d8e7
-            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_TPM_CONFIG_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
+            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
             Build.Target: "RELEASE"
75d8e7
             Run.Flags: $(run_flags)
75d8e7
             Run: $(should_run)
75d8e7
           OVMF_IA32X64_FULL_NOOPT:
75d8e7
             Build.File: "$(package)/PlatformCI/PlatformBuild.py"
75d8e7
             Build.Arch: "IA32,X64"
75d8e7
-            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_TPM_CONFIG_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
+            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
             Build.Target: "NOOPT"
75d8e7
             Run.Flags: $(run_flags)
75d8e7
             Run: $(should_run)
75d8e7
diff --git a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
75d8e7
index 2e07a3d889..09f9851312 100644
75d8e7
--- a/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
75d8e7
+++ b/OvmfPkg/PlatformCI/.azurepipelines/Windows-VS2019.yml
75d8e7
@@ -94,14 +94,14 @@ jobs:
75d8e7
           OVMF_IA32X64_FULL_DEBUG:
75d8e7
             Build.File: "$(package)/PlatformCI/PlatformBuild.py"
75d8e7
             Build.Arch: "IA32,X64"
75d8e7
-            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_TPM_CONFIG_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
+            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
             Build.Target: "DEBUG"
75d8e7
             Run.Flags: $(run_flags)
75d8e7
             Run: $(should_run)
75d8e7
           OVMF_IA32X64_FULL_RELEASE:
75d8e7
             Build.File: "$(package)/PlatformCI/PlatformBuild.py"
75d8e7
             Build.Arch: "IA32,X64"
75d8e7
-            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_TPM_CONFIG_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
+            Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
             Build.Target: "RELEASE"
75d8e7
             Run.Flags: $(run_flags)
75d8e7
             Run: $(should_run)
75d8e7
@@ -112,7 +112,7 @@ jobs:
75d8e7
     #       OVMF_IA32X64_FULL_NOOPT:
75d8e7
     #         Build.File: "$(package)/PlatformCI/PlatformBuild.py"
75d8e7
     #         Build.Arch: "IA32,X64"
75d8e7
-    #         Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_TPM_CONFIG_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
+    #         Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=1 BLD_*_SMM_REQUIRE=1 BLD_*_TPM_ENABLE=1 BLD_*_NETWORK_TLS_ENABLE=1 BLD_*_NETWORK_IP6_ENABLE=1 BLD_*_NETWORK_HTTP_BOOT_ENABLE=1"
75d8e7
     #         Build.Target: "NOOPT"
75d8e7
     #         Run.Flags: $(run_flags)
75d8e7
     #         Run: $(should_run)
75d8e7
diff --git a/OvmfPkg/PlatformCI/ReadMe.md b/OvmfPkg/PlatformCI/ReadMe.md
75d8e7
index 2ce9007dbe..44aa7c4a9d 100644
75d8e7
--- a/OvmfPkg/PlatformCI/ReadMe.md
75d8e7
+++ b/OvmfPkg/PlatformCI/ReadMe.md
75d8e7
@@ -14,7 +14,7 @@ supported and are described below.
75d8e7
 | IA32                    | IA32               | OvmfPkgIa32.dsc     | None            |
75d8e7
 | X64                     | X64                | OvmfPkgIa64.dsc     | None            |
75d8e7
 | IA32 X64                | PEI-IA32 DXE-X64   | OvmfPkgIa32X64.dsc  | None            |
75d8e7
-| IA32 X64 Full           | PEI-IA32 DXE-X64   | OvmfPkgIa32X64.dsc  | SECURE_BOOT_ENABLE=1 SMM_REQUIRE=1 TPM_ENABLE=1 TPM_CONFIG_ENABLE=1 NETWORK_TLS_ENABLE=1 NETWORK_IP6_ENABLE=1 NETWORK_HTTP_BOOT_ENABLE=1 |
75d8e7
+| IA32 X64 Full           | PEI-IA32 DXE-X64   | OvmfPkgIa32X64.dsc  | SECURE_BOOT_ENABLE=1 SMM_REQUIRE=1 TPM_ENABLE=1 NETWORK_TLS_ENABLE=1 NETWORK_IP6_ENABLE=1 NETWORK_HTTP_BOOT_ENABLE=1 |
75d8e7
 
75d8e7
 ## EDK2 Developer environment
75d8e7
 
75d8e7
-- 
75d8e7
2.27.0
75d8e7