UefiCpuPkg/MpInitLib: use PcdConfidentialComputingAttr to check SEV status
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 Previous commit introduced a generic confidential computing PCD that can determine whether AMD SEV-ES is enabled. Update the MpInitLib to drop the PcdSevEsIsEnabled in favor of PcdConfidentialComputingAttr. Cc: Michael Roth <michael.roth@amd.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Erdem Aktas <erdemaktas@google.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Ray Ni <ray.ni@intel.com> Suggested-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
This commit is contained in:
committed by
mergify[bot]
parent
504ae26b80
commit
b95908e043
@@ -93,7 +93,7 @@ GetWakeupBuffer (
|
||||
EFI_PHYSICAL_ADDRESS StartAddress;
|
||||
EFI_MEMORY_TYPE MemoryType;
|
||||
|
||||
if (PcdGetBool (PcdSevEsIsEnabled)) {
|
||||
if (ConfidentialComputingGuestHas (CCAttrAmdSevEs)) {
|
||||
MemoryType = EfiReservedMemoryType;
|
||||
} else {
|
||||
MemoryType = EfiBootServicesData;
|
||||
@@ -107,7 +107,7 @@ GetWakeupBuffer (
|
||||
// LagacyBios driver depends on CPU Arch protocol which guarantees below
|
||||
// allocation runs earlier than LegacyBios driver.
|
||||
//
|
||||
if (PcdGetBool (PcdSevEsIsEnabled)) {
|
||||
if (ConfidentialComputingGuestHas (CCAttrAmdSevEs)) {
|
||||
//
|
||||
// SEV-ES Wakeup buffer should be under 0x88000 and under any previous one
|
||||
//
|
||||
@@ -125,7 +125,7 @@ GetWakeupBuffer (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (EFI_ERROR (Status)) {
|
||||
StartAddress = (EFI_PHYSICAL_ADDRESS)-1;
|
||||
} else if (PcdGetBool (PcdSevEsIsEnabled)) {
|
||||
} else if (ConfidentialComputingGuestHas (CCAttrAmdSevEs)) {
|
||||
//
|
||||
// Next SEV-ES wakeup buffer allocation must be below this allocation
|
||||
//
|
||||
|
Reference in New Issue
Block a user