]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/DebugUncachedMemoryAllocationLib/DebugUncachedMemoryAllocationLib.c
Sync up ArmPkg with patch from mailing list. Changed name of BdsLib.h to BdsUnixLib...
[mirror_edk2.git] / ArmPkg / Library / DebugUncachedMemoryAllocationLib / DebugUncachedMemoryAllocationLib.c
index 80e7c8c4729c4a611766aba4395eca350769c2f0..80ee5aa249e94ac2cd13cf46bb78360d58a864ce 100644 (file)
@@ -10,9 +10,9 @@
   has a virtual address that does not match the physical address. The virtual address has\r
   PcdArmUncachedMemoryMask ored into the physical address.\r
 \r
   has a virtual address that does not match the physical address. The virtual address has\r
   PcdArmUncachedMemoryMask ored into the physical address.\r
 \r
-  Copyright (c) 2008-2010, Apple Inc. All rights reserved.\r
+  Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
   \r
   \r
-  All rights reserved. This program and the accompanying materials\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -83,7 +83,8 @@ AddPagesToList (
   \r
   NewNode->Buffer     = Buffer;\r
   NewNode->Allocation = Allocation;\r
   \r
   NewNode->Buffer     = Buffer;\r
   NewNode->Allocation = Allocation;\r
-  \r
+  NewNode->Pages      = Pages;\r
+\r
   InsertTailList (&mPageList, &NewNode->Link);\r
 }\r
 \r
   InsertTailList (&mPageList, &NewNode->Link);\r
 }\r
 \r
@@ -292,7 +293,7 @@ UncachedFreeAlignedPages (
   Status = gVirtualUncachedPages->RevertPages (gVirtualUncachedPages, Memory, Pages * EFI_PAGE_SIZE, PcdGet64 (PcdArmUncachedMemoryMask), gAttributes);\r
 \r
   \r
   Status = gVirtualUncachedPages->RevertPages (gVirtualUncachedPages, Memory, Pages * EFI_PAGE_SIZE, PcdGet64 (PcdArmUncachedMemoryMask), gAttributes);\r
 \r
   \r
-  Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages);\r
+  Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Memory, Pages);\r
   ASSERT_EFI_ERROR (Status);\r
 }\r
 \r
   ASSERT_EFI_ERROR (Status);\r
 }\r
 \r