ArmPkg: Invalidate cache after allocating UC memory
It is implied that the memory returned from UncachedMemoryAllocationLib should have cache invalidated. So we invalidate memory range after changing memory attribute to uncached. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18920 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/ArmLib.h>
|
||||
#include <Library/DxeServicesTableLib.h>
|
||||
#include <Library/CacheMaintenanceLib.h>
|
||||
|
||||
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);
|
||||
|
Reference in New Issue
Block a user