diff options
author | Ceping Sun <cepingx.sun@intel.com> | 2024-03-06 07:06:26 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-03 17:06:40 +0000 |
commit | 5bb4f9694a6d765a8f3a3474c6835b0f167428d5 (patch) | |
tree | 9e3434af65f58c2bddcbf4dbe2b5a13d37ffd301 /OvmfPkg | |
parent | d997d3c62f6c3255491da09235cc7410cefad850 (diff) | |
download | edk2-5bb4f9694a6d765a8f3a3474c6835b0f167428d5.tar.gz edk2-5bb4f9694a6d765a8f3a3474c6835b0f167428d5.tar.bz2 edk2-5bb4f9694a6d765a8f3a3474c6835b0f167428d5.zip |
OvmfPkg/PlatformPei: Build gCcEventEntryHobGuid at First
Since the PEI Hob service is ready after PEIM loaded,
TDVF should build the Hob for TdHob and Cfv event
at first.
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/OvmfPkgIa32.dsc | 5 | ||||
-rw-r--r-- | OvmfPkg/OvmfPkgIa32X64.dsc | 5 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/IntelTdx.c | 2 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 5 |
4 files changed, 13 insertions, 4 deletions
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index bd6e8abbcb..974ab62362 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -704,7 +704,10 @@ }
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
- OvmfPkg/PlatformPei/PlatformPei.inf
+ OvmfPkg/PlatformPei/PlatformPei.inf {
+ <LibraryClasses>
+ NULL|OvmfPkg/IntelTdx/TdxHelperLib/TdxHelperLibNull.inf
+ }
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf {
<LibraryClasses>
!if $(SMM_REQUIRE) == TRUE
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index f28049a36a..c0e3210a83 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -717,7 +717,10 @@ }
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
- OvmfPkg/PlatformPei/PlatformPei.inf
+ OvmfPkg/PlatformPei/PlatformPei.inf {
+ <LibraryClasses>
+ NULL|OvmfPkg/IntelTdx/TdxHelperLib/TdxHelperLibNull.inf
+ }
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf {
<LibraryClasses>
!if $(SMM_REQUIRE) == TRUE
diff --git a/OvmfPkg/PlatformPei/IntelTdx.c b/OvmfPkg/PlatformPei/IntelTdx.c index 1cb6729e56..8aa796b3e9 100644 --- a/OvmfPkg/PlatformPei/IntelTdx.c +++ b/OvmfPkg/PlatformPei/IntelTdx.c @@ -40,8 +40,6 @@ IntelTdxInitialize ( return;
}
- TdxHelperBuildGuidHobForTdxMeasurement ();
-
PcdStatus = PcdSet64S (PcdConfidentialComputingGuestAttr, CCAttrIntelTdx);
ASSERT_RETURN_ERROR (PcdStatus);
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 0114529778..dc81ce9e2b 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -38,6 +38,7 @@ #include <IndustryStandard/QemuCpuHotplug.h>
#include <Library/MemEncryptSevLib.h>
#include <OvmfPlatforms.h>
+#include <Library/TdxHelperLib.h>
#include "Platform.h"
#include "PlatformId.h"
@@ -311,6 +312,10 @@ InitializePlatform ( DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n"));
PlatformInfoHob = BuildPlatformInfoHob ();
+ if (TdIsEnabled ()) {
+ TdxHelperBuildGuidHobForTdxMeasurement ();
+ }
+
PlatformInfoHob->SmmSmramRequire = FeaturePcdGet (PcdSmmSmramRequire);
PlatformInfoHob->SevEsIsEnabled = MemEncryptSevEsIsEnabled ();
PlatformInfoHob->PcdPciMmio64Size = PcdGet64 (PcdPciMmio64Size);
|