diff --git a/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c b/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c index b859f63c2b..1dfc7402fb 100644 --- a/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c +++ b/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c @@ -25,6 +25,7 @@ #include #include #include +#include VOID * UncachedInternalAllocatePages ( @@ -165,6 +166,8 @@ AllocatePagesFromList ( return Status; } + InvalidateDataCacheRange ((VOID *)(UINTN)Memory, EFI_PAGES_TO_SIZE (Pages)); + NewNode = AllocatePool (sizeof (FREE_PAGE_NODE)); if (NewNode == NULL) { ASSERT (FALSE); diff --git a/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.inf b/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.inf index 0a0b6cbcc8..d7a0f2f792 100644 --- a/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.inf +++ b/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.inf @@ -38,6 +38,7 @@ MemoryAllocationLib PcdLib DxeServicesTableLib + CacheMaintenanceLib [Pcd] gArmTokenSpaceGuid.PcdArmFreeUncachedMemorySizeThreshold