From 44c011619ed3b50bec7374cabc549d82ace50f1a Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Mon, 18 Jul 2011 17:40:12 +0000 Subject: ArmPkg/UncachedMemoryAllocationLib: Use gDS function to set memory attributes Calling directly the CPU Architectural protocol does not update the GCD. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12024 6f19259b-4bc3-4df7-8a09-765794883524 --- .../UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ArmPkg/Library/UncachedMemoryAllocationLib') diff --git a/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c b/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c index bc2fbcbb4c..657268a288 100644 --- a/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c +++ b/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c @@ -14,6 +14,7 @@ **/ +#include #include #include #include @@ -244,10 +245,8 @@ UncachedInternalAllocateAlignedPages ( gAttributes = Descriptor.Attributes; } - Status = gDebugUncachedCpu->SetMemoryAttributes (gDebugUncachedCpu, Memory, EFI_PAGES_TO_SIZE (Pages), EFI_MEMORY_UC); - if (EFI_ERROR (Status)) { - return NULL; - } + Status = gDS->SetMemorySpaceAttributes (Memory, EFI_PAGES_TO_SIZE (Pages), EFI_MEMORY_UC); + ASSERT_EFI_ERROR (Status); return (VOID *)(UINTN)Memory; } -- cgit v1.2.3