Revision: 18390
          http://sourceforge.net/p/edk2/code/18390
Author:   leiflindholm
Date:     2015-09-02 16:29:31 +0000 (Wed, 02 Sep 2015)
Log Message:
-----------
ArmPkg: Bug fix for UncachedMemoryAllocationLib

NewNode is the node we found, while Node is the last node in the
list. Also update mFreedBufferSize.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi....@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>

Modified Paths:
--------------
    
trunk/edk2/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c

Modified: 
trunk/edk2/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c
===================================================================
--- 
trunk/edk2/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c
 2015-09-02 08:44:46 UTC (rev 18389)
+++ 
trunk/edk2/ArmPkg/Library/UncachedMemoryAllocationLib/UncachedMemoryAllocationLib.c
 2015-09-02 16:29:31 UTC (rev 18390)
@@ -125,9 +125,10 @@
   }
   // Check if we have found a node that could contain our new allocation
   if (NewNode != NULL) {
-    NewNode->Allocated = TRUE;
-    Node->Allocation   = (VOID*)(UINTN)Node->Base;
-    *Allocation        = Node->Allocation;
+    NewNode->Allocated  = TRUE;
+    NewNode->Allocation = (VOID*)(UINTN)NewNode->Base;
+    *Allocation         = NewNode->Allocation;
+    mFreedBufferSize    -= NewNode->Pages * EFI_PAGE_SIZE;
     return EFI_SUCCESS;
   }
 


------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to