Browse Source

SecurityPkg: Move TdTcg2Dxe from OvmfPkg to SecurityPkg

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4194

The TdTcg2Dxe lives in the OvmfPkg instead of the SecurityPkg. Having
the TdTcg2Dxe at the same place as Tcg2Dxe will be easier for platforms to
consume.

Definition of PcdCcEventlogAcpiTableLaml and PcdCcEventlogAcpiTableLasa
are also moved from OvmfPkg.dec to SecurityPkg.dec.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Arti Gupta <ARGU@microsoft.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Min M Xu 1 year ago
parent
commit
5654ce1d2c

+ 1 - 1
OvmfPkg/IntelTdx/IntelTdxX64.dsc

@@ -774,7 +774,7 @@
   #
   #
   # Cc Measurement Protocol for Td guest
   # Cc Measurement Protocol for Td guest
   #
   #
-  OvmfPkg/IntelTdx/TdTcg2Dxe/TdTcg2Dxe.inf {
+  SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.inf {
     <LibraryClasses>
     <LibraryClasses>
       HashLib|SecurityPkg/Library/HashLibTdx/HashLibTdx.inf
       HashLib|SecurityPkg/Library/HashLibTdx/HashLibTdx.inf
       NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
       NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf

+ 1 - 1
OvmfPkg/IntelTdx/IntelTdxX64.fdf

@@ -298,7 +298,7 @@ INF  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
 #
 #
 # EFI_CC_MEASUREMENT_PROTOCOL
 # EFI_CC_MEASUREMENT_PROTOCOL
 #
 #
-INF OvmfPkg/IntelTdx/TdTcg2Dxe/TdTcg2Dxe.inf
+INF SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.inf
 
 
 ################################################################################
 ################################################################################
 
 

+ 0 - 6
OvmfPkg/OvmfPkg.dec

@@ -459,12 +459,6 @@
   #    2 - set by GOP Driver.
   #    2 - set by GOP Driver.
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0|UINT8|0x64
   gUefiOvmfPkgTokenSpaceGuid.PcdVideoResolutionSource|0|UINT8|0x64
 
 
-  ## This PCD records LAML field in CC EVENTLOG ACPI table.
-  gUefiOvmfPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLaml|0|UINT32|0x66
-
-  ## This PCD records LASA field in CC EVENTLOG ACPI table.
-  gUefiOvmfPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLasa|0|UINT64|0x67
-
 [PcdsFeatureFlag]
 [PcdsFeatureFlag]
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE|BOOLEAN|0x1c
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE|BOOLEAN|0x1c
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|FALSE|BOOLEAN|0x1d
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|FALSE|BOOLEAN|0x1d

+ 6 - 0
SecurityPkg/SecurityPkg.dec

@@ -574,5 +574,11 @@
   # @Prompt Tpm2AcpiTableLasa LASA field in TPM2 ACPI table.
   # @Prompt Tpm2AcpiTableLasa LASA field in TPM2 ACPI table.
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableLasa|0|UINT64|0x00010023
   gEfiSecurityPkgTokenSpaceGuid.PcdTpm2AcpiTableLasa|0|UINT64|0x00010023
 
 
+  ## This PCD records LAML field in CC EVENTLOG ACPI table.
+  gEfiSecurityPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLaml|0|UINT32|0x00010025
+
+  ## This PCD records LASA field in CC EVENTLOG ACPI table.
+  gEfiSecurityPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLasa|0|UINT64|0x00010026
+
 [UserExtensions.TianoCore."ExtraFiles"]
 [UserExtensions.TianoCore."ExtraFiles"]
   SecurityPkgExtra.uni
   SecurityPkgExtra.uni

+ 5 - 0
SecurityPkg/SecurityPkg.dsc

@@ -296,6 +296,11 @@
 [Components.X64]
 [Components.X64]
   SecurityPkg/Library/HashLibTdx/HashLibTdx.inf
   SecurityPkg/Library/HashLibTdx/HashLibTdx.inf
   SecurityPkg/Library/SecTpmMeasurementLib/SecTpmMeasurementLibTdx.inf
   SecurityPkg/Library/SecTpmMeasurementLib/SecTpmMeasurementLibTdx.inf
+  SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.inf {
+    <LibraryClasses>
+      HashLib|SecurityPkg/Library/HashLibTdx/HashLibTdx.inf
+      NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
+  }
 
 
 [Components.IA32, Components.X64]
 [Components.IA32, Components.X64]
   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf

+ 0 - 0
OvmfPkg/IntelTdx/TdTcg2Dxe/MeasureBootPeCoff.c → SecurityPkg/Tcg/TdTcg2Dxe/MeasureBootPeCoff.c


+ 0 - 0
OvmfPkg/IntelTdx/TdTcg2Dxe/TdTcg2Dxe.c → SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c


+ 2 - 3
OvmfPkg/IntelTdx/TdTcg2Dxe/TdTcg2Dxe.inf → SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.inf

@@ -31,7 +31,6 @@
   MdeModulePkg/MdeModulePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   SecurityPkg/SecurityPkg.dec
   SecurityPkg/SecurityPkg.dec
   CryptoPkg/CryptoPkg.dec
   CryptoPkg/CryptoPkg.dec
-  OvmfPkg/OvmfPkg.dec
 
 
 [LibraryClasses]
 [LibraryClasses]
   MemoryAllocationLib
   MemoryAllocationLib
@@ -85,8 +84,8 @@
   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2NumberOfPCRBanks                     ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2NumberOfPCRBanks                     ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcgLogAreaMinLen                         ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcgLogAreaMinLen                         ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2FinalLogAreaLen                      ## CONSUMES
   gEfiSecurityPkgTokenSpaceGuid.PcdTcg2FinalLogAreaLen                      ## CONSUMES
-  gUefiOvmfPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLaml                     ## PRODUCES
-  gUefiOvmfPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLasa                     ## PRODUCES
+  gEfiSecurityPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLaml                  ## PRODUCES
+  gEfiSecurityPkgTokenSpaceGuid.PcdCcEventlogAcpiTableLasa                  ## PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId                        ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId                        ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId                   ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId                   ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision                  ## CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision                  ## CONSUMES