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/PlatformPei | |
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/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/IntelTdx.c | 2 | ||||
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 5 |
2 files changed, 5 insertions, 2 deletions
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);
|