]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c
ArmPkg/UncachedMemoryAllocationLib: Use gDS function to set memory attributes
[mirror_edk2.git] / ArmPkg / Library / UncachedMemoryAllocationLib / UncachedMemoryAllocationLib.c
index bc2fbcbb4cd789158b8e83e4f7891c22cfb306a2..657268a288e753cef9333efee8daa89d29d2410e 100644 (file)
@@ -14,6 +14,7 @@
 \r
 **/\r
 \r
+#include <Base.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
@@ -244,10 +245,8 @@ UncachedInternalAllocateAlignedPages (
     gAttributes = Descriptor.Attributes;\r
   }\r
   \r
-  Status = gDebugUncachedCpu->SetMemoryAttributes (gDebugUncachedCpu, Memory, EFI_PAGES_TO_SIZE (Pages), EFI_MEMORY_UC);\r
-  if (EFI_ERROR (Status)) {\r
-    return NULL;\r
-  }\r
+  Status = gDS->SetMemorySpaceAttributes (Memory, EFI_PAGES_TO_SIZE (Pages), EFI_MEMORY_UC);\r
+  ASSERT_EFI_ERROR (Status);\r
   \r
   return (VOID *)(UINTN)Memory;\r
 }\r