]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Gcd/Gcd.c
Clean up DxeCore to remove duplicate memory allocation & device path utility services...
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Gcd / Gcd.c
index 2e7afb33c3a1566fedcf30e3a938a3ef64f3a9cc..4927c67c18c6567e0371dac37b835f1c47d453de 100644 (file)
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 #define MINIMUM_INITIAL_MEMORY_SIZE 0x10000\r
 \r
@@ -235,12 +235,12 @@ CoreAllocateGcdMapEntry (
   IN OUT EFI_GCD_MAP_ENTRY  **BottomEntry\r
   )\r
 {\r
-  *TopEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_GCD_MAP_ENTRY));\r
+  *TopEntry = AllocateZeroPool (sizeof (EFI_GCD_MAP_ENTRY));\r
   if (*TopEntry == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  *BottomEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_GCD_MAP_ENTRY));\r
+  *BottomEntry = AllocateZeroPool (sizeof (EFI_GCD_MAP_ENTRY));\r
   if (*BottomEntry == NULL) {\r
     CoreFreePool (*TopEntry);\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -1401,7 +1401,7 @@ CoreGetMemorySpaceMap (
   //\r
   // Allocate the MemorySpaceMap\r
   //\r
-  *MemorySpaceMap = CoreAllocateBootServicesPool (*NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR));\r
+  *MemorySpaceMap = AllocatePool (*NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR));\r
   if (*MemorySpaceMap == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Done;\r
@@ -1649,7 +1649,7 @@ CoreGetIoSpaceMap (
   //\r
   // Allocate the IoSpaceMap\r
   //\r
-  *IoSpaceMap = CoreAllocateBootServicesPool (*NumberOfDescriptors * sizeof (EFI_GCD_IO_SPACE_DESCRIPTOR));\r
+  *IoSpaceMap = AllocatePool (*NumberOfDescriptors * sizeof (EFI_GCD_IO_SPACE_DESCRIPTOR));\r
   if (*IoSpaceMap == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Done;\r
@@ -1983,7 +1983,7 @@ CoreInitializeGcdServices (
   //\r
   // Initialize the GCD Memory Space Map\r
   //\r
-  Entry = CoreAllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);\r
+  Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);\r
   ASSERT (Entry != NULL);\r
 \r
   Entry->EndAddress = LShiftU64 (1, SizeOfMemorySpace) - 1;\r
@@ -1993,7 +1993,7 @@ CoreInitializeGcdServices (
   //\r
   // Initialize the GCD I/O Space Map\r
   //\r
-  Entry = CoreAllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);\r
+  Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);\r
   ASSERT (Entry != NULL);\r
 \r
   Entry->EndAddress = LShiftU64 (1, SizeOfIoSpace) - 1;\r
@@ -2128,7 +2128,7 @@ CoreInitializeGcdServices (
   //\r
   // Relocate HOB List to an allocated pool buffer.\r
   //\r
-  NewHobList = CoreAllocateCopyPool (\r
+  NewHobList = AllocateCopyPool (\r
                  (UINTN)PhitHob->EfiFreeMemoryBottom - (UINTN)(*HobStart),\r
                  *HobStart\r
                  );\r