]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
UefiCpuPkg/MpInitLib: use PcdConfidentialComputingAttr to check SEV status
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / DxeMpLib.c
index 9d9206d20915bc9d3d3a15b412d210cb142f24c1..02bc9c2bd2c4f763ba471ffb222b0ced8a8cea89 100644 (file)
@@ -93,7 +93,7 @@ GetWakeupBuffer (
   EFI_PHYSICAL_ADDRESS  StartAddress;\r
   EFI_MEMORY_TYPE       MemoryType;\r
 \r
-  if (PcdGetBool (PcdSevEsIsEnabled)) {\r
+  if (ConfidentialComputingGuestHas (CCAttrAmdSevEs)) {\r
     MemoryType = EfiReservedMemoryType;\r
   } else {\r
     MemoryType = EfiBootServicesData;\r
@@ -107,7 +107,7 @@ GetWakeupBuffer (
   // LagacyBios driver depends on CPU Arch protocol which guarantees below\r
   // allocation runs earlier than LegacyBios driver.\r
   //\r
-  if (PcdGetBool (PcdSevEsIsEnabled)) {\r
+  if (ConfidentialComputingGuestHas (CCAttrAmdSevEs)) {\r
     //\r
     // SEV-ES Wakeup buffer should be under 0x88000 and under any previous one\r
     //\r
@@ -125,7 +125,7 @@ GetWakeupBuffer (
   ASSERT_EFI_ERROR (Status);\r
   if (EFI_ERROR (Status)) {\r
     StartAddress = (EFI_PHYSICAL_ADDRESS)-1;\r
-  } else if (PcdGetBool (PcdSevEsIsEnabled)) {\r
+  } else if (ConfidentialComputingGuestHas (CCAttrAmdSevEs)) {\r
     //\r
     // Next SEV-ES wakeup buffer allocation must be below this allocation\r
     //\r