]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg DxeCore: Missing change for OEM reserved memory type at R17460
authorStar Zeng <star.zeng@intel.com>
Fri, 29 Jan 2016 08:24:10 +0000 (16:24 +0800)
committerStar Zeng <star.zeng@intel.com>
Mon, 15 Feb 2016 10:12:02 +0000 (18:12 +0800)
At the end of CoreFreePoolI(), the check to see if it is a specific
memory type should also cover OEM reserved memory type.
It was missed when adding OEM reserved memory type support at R17460.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Core/Dxe/Mem/Pool.c

index e5fee1abfc56dec170008f9075d14771c1b7e1e0..ad9a85feaf6a59078eae5c1975983bced98b2681 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Memory pool management functions.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\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
@@ -658,11 +658,11 @@ CoreFreePoolI (
   }\r
 \r
   //\r
-  // If this is an OS specific memory type, then check to see if the last\r
+  // If this is an OS/OEM specific memory type, then check to see if the last\r
   // portion of that memory type has been freed.  If it has, then free the\r
   // list entry for that memory type\r
   //\r
-  if ((INT32)Pool->MemoryType < 0 && Pool->Used == 0) {\r
+  if (((UINT32) Pool->MemoryType >= MEMORY_TYPE_OEM_RESERVED_MIN) && Pool->Used == 0) {\r
     RemoveEntryList (&Pool->Link);\r
     CoreFreePoolI (Pool);\r
   }\r