diff options
Diffstat (limited to 'OvmfPkg/AmdSevDxe/AmdSevDxe.c')
-rw-r--r-- | OvmfPkg/AmdSevDxe/AmdSevDxe.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c index 6391d1f775..9c4e3bb406 100644 --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c @@ -23,6 +23,10 @@ #include <Pi/PrePiDxeCis.h>
#include <Protocol/SevMemoryAcceptance.h>
#include <Protocol/MemoryAccept.h>
+#include <Uefi/UefiSpec.h>
+
+// Present, initialized, tested bits defined in MdeModulePkg/Core/Dxe/DxeMain.h
+#define EFI_MEMORY_INTERNAL_MASK 0x0700000000000000ULL
STATIC CONFIDENTIAL_COMPUTING_SNP_BLOB_LOCATION mSnpBootDxeTable = {
SIGNATURE_32 ('A', 'M', 'D', 'E'),
@@ -116,7 +120,9 @@ AcceptAllMemory ( EfiGcdMemoryTypeSystemMemory,
Desc->BaseAddress,
Desc->Length,
- EFI_MEMORY_CPU_CRYPTO | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_RP
+ // Allocable system memory resource capabilities as masked
+ // in MdeModulePkg/Core/Dxe/Mem/Page.c:PromoteMemoryResource
+ Desc->Capabilities & ~(EFI_MEMORY_INTERNAL_MASK | EFI_MEMORY_RUNTIME)
);
if (EFI_ERROR (Status)) {
break;
|