]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c
ArmPkg: Invalidate cache after allocating UC memory
[mirror_edk2.git] / ArmPkg / Library / UncachedMemoryAllocationLib / UncachedMemoryAllocationLib.c
index b859f63c2b5a0256b01f650a4f29bce4ecf893de..1dfc7402fba437cdea420024f4d5427be8e7a11f 100644 (file)
@@ -25,6 +25,7 @@
 #include <Library/PcdLib.h>\r
 #include <Library/ArmLib.h>\r
 #include <Library/DxeServicesTableLib.h>\r
+#include <Library/CacheMaintenanceLib.h>\r
 \r
 VOID *\r
 UncachedInternalAllocatePages (\r
@@ -165,6 +166,8 @@ AllocatePagesFromList (
     return Status;\r
   }\r
 \r
+  InvalidateDataCacheRange ((VOID *)(UINTN)Memory, EFI_PAGES_TO_SIZE (Pages));\r
+\r
   NewNode = AllocatePool (sizeof (FREE_PAGE_NODE));\r
   if (NewNode == NULL) {\r
     ASSERT (FALSE);\r