]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/CpuPageTable.c
UefiCpuPkg: Add New Memory Attributes
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / CpuPageTable.c
index 0a02cb3f6b7e1606536126368738d04c5ed74f7a..06ee1b8231716097759bff917f72f06aa954e1e9 100644 (file)
@@ -717,7 +717,7 @@ ConvertMemoryPageAttributes (
     return RETURN_INVALID_PARAMETER;\r
   }\r
 \r
-  if ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) != 0) {\r
+  if ((Attributes & ~EFI_MEMORY_ATTRIBUTE_MASK) != 0) {\r
     DEBUG ((DEBUG_ERROR, "Attributes(0x%lx) has unsupported bit\n", Attributes));\r
     return EFI_UNSUPPORTED;\r
   }\r
@@ -1018,9 +1018,9 @@ RefreshGcdMemoryAttributesFromPaging (
 \r
       Length = MIN (PageLength, MemorySpaceLength);\r
       if (Attributes != (MemorySpaceMap[Index].Attributes &\r
-                         EFI_MEMORY_PAGETYPE_MASK)) {\r
+                         EFI_MEMORY_ATTRIBUTE_MASK)) {\r
         NewAttributes = (MemorySpaceMap[Index].Attributes &\r
-                         ~EFI_MEMORY_PAGETYPE_MASK) | Attributes;\r
+                         ~EFI_MEMORY_ATTRIBUTE_MASK) | Attributes;\r
         Status = gDS->SetMemorySpaceAttributes (\r
                         BaseAddress,\r
                         Length,\r