summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCeping Sun <cepingx.sun@intel.com>2023-07-10 18:05:39 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-07-17 04:59:35 +0000
commit39ded59c09a38cb17cee498fca9f390c4deca98a (patch)
treefbc668de29038aa5d8da8c219dfdd42bb858a854
parent3399f64588428010d48c754f3743bdc8131fa270 (diff)
downloadedk2-39ded59c09a38cb17cee498fca9f390c4deca98a.tar.gz
edk2-39ded59c09a38cb17cee498fca9f390c4deca98a.tar.bz2
edk2-39ded59c09a38cb17cee498fca9f390c4deca98a.zip
OvmfPkg/PeilessStartupLib: Updated with PcdSecureBootSupported
SECURE_BOOT_FEATURE_ENABLED was dropped by the commit(92da8a154f), but the PeilessStartupLib was not updated with PcdSecureBootSupported, that made SecureBoot no longer work in IntelTdxX64. Fix this by replacing SECURE_BOOT_FEATURE_ENABLED with PcdSecureBootSupported in PeilessStartupLib. Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Michael Roth <michael.roth@amd.com> Signed-off-by: Ceping Sun <cepingx.sun@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
-rw-r--r--OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c6
-rw-r--r--OvmfPkg/Library/PeilessStartupLib/PeilessStartupLib.inf1
2 files changed, 4 insertions, 3 deletions
diff --git a/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c b/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c
index 164aa2d619..1632a23177 100644
--- a/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c
+++ b/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c
@@ -82,9 +82,9 @@ InitializePlatform (
VariableStore = PlatformReserveEmuVariableNvStore ();
PlatformInfoHob->PcdEmuVariableNvStoreReserved = (UINT64)(UINTN)VariableStore;
- #ifdef SECURE_BOOT_FEATURE_ENABLED
- PlatformInitEmuVariableNvStore (VariableStore);
- #endif
+ if (FeaturePcdGet (PcdSecureBootSupported)) {
+ PlatformInitEmuVariableNvStore (VariableStore);
+ }
if (TdIsEnabled ()) {
PlatformTdxPublishRamRegions ();
diff --git a/OvmfPkg/Library/PeilessStartupLib/PeilessStartupLib.inf b/OvmfPkg/Library/PeilessStartupLib/PeilessStartupLib.inf
index 7719b5031d..585d504637 100644
--- a/OvmfPkg/Library/PeilessStartupLib/PeilessStartupLib.inf
+++ b/OvmfPkg/Library/PeilessStartupLib/PeilessStartupLib.inf
@@ -83,3 +83,4 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask ## CONSUMES
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvBase
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfDxeMemFvSize
+ gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootSupported