summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe/Gcd
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-27 14:29:23 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-27 14:29:23 +0000
commit9c4ac31cca01b4a503c36616770ea3157bf3bb9e (patch)
tree2da9349c7a4a732e3ebc27981a095b1db3146f35 /MdeModulePkg/Core/Dxe/Gcd
parentfb53e6cc348e96709da625a2334faeabd4f31523 (diff)
downloadedk2-platforms-9c4ac31cca01b4a503c36616770ea3157bf3bb9e.tar.xz
Clean up DxeCore to remove duplicate memory allocation & device path utility services in Library.c.DxeCore should use MemoryAllocationLib & DevicePathLib for these API.
Minor cleanup the coding style: #include <DxeMain.h> should be changed to #include "DxeMain.h" since "DxeMain.h" is not pubic header fie. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5742 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Gcd')
-rw-r--r--MdeModulePkg/Core/Dxe/Gcd/Gcd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
index 2e7afb33c3..4927c67c18 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-#include <DxeMain.h>
+#include "DxeMain.h"
#define MINIMUM_INITIAL_MEMORY_SIZE 0x10000
@@ -235,12 +235,12 @@ CoreAllocateGcdMapEntry (
IN OUT EFI_GCD_MAP_ENTRY **BottomEntry
)
{
- *TopEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_GCD_MAP_ENTRY));
+ *TopEntry = AllocateZeroPool (sizeof (EFI_GCD_MAP_ENTRY));
if (*TopEntry == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- *BottomEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_GCD_MAP_ENTRY));
+ *BottomEntry = AllocateZeroPool (sizeof (EFI_GCD_MAP_ENTRY));
if (*BottomEntry == NULL) {
CoreFreePool (*TopEntry);
return EFI_OUT_OF_RESOURCES;
@@ -1401,7 +1401,7 @@ CoreGetMemorySpaceMap (
//
// Allocate the MemorySpaceMap
//
- *MemorySpaceMap = CoreAllocateBootServicesPool (*NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR));
+ *MemorySpaceMap = AllocatePool (*NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR));
if (*MemorySpaceMap == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Done;
@@ -1649,7 +1649,7 @@ CoreGetIoSpaceMap (
//
// Allocate the IoSpaceMap
//
- *IoSpaceMap = CoreAllocateBootServicesPool (*NumberOfDescriptors * sizeof (EFI_GCD_IO_SPACE_DESCRIPTOR));
+ *IoSpaceMap = AllocatePool (*NumberOfDescriptors * sizeof (EFI_GCD_IO_SPACE_DESCRIPTOR));
if (*IoSpaceMap == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Done;
@@ -1983,7 +1983,7 @@ CoreInitializeGcdServices (
//
// Initialize the GCD Memory Space Map
//
- Entry = CoreAllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);
+ Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdMemorySpaceMapEntryTemplate);
ASSERT (Entry != NULL);
Entry->EndAddress = LShiftU64 (1, SizeOfMemorySpace) - 1;
@@ -1993,7 +1993,7 @@ CoreInitializeGcdServices (
//
// Initialize the GCD I/O Space Map
//
- Entry = CoreAllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);
+ Entry = AllocateCopyPool (sizeof (EFI_GCD_MAP_ENTRY), &mGcdIoSpaceMapEntryTemplate);
ASSERT (Entry != NULL);
Entry->EndAddress = LShiftU64 (1, SizeOfIoSpace) - 1;
@@ -2128,7 +2128,7 @@ CoreInitializeGcdServices (
//
// Relocate HOB List to an allocated pool buffer.
//
- NewHobList = CoreAllocateCopyPool (
+ NewHobList = AllocateCopyPool (
(UINTN)PhitHob->EfiFreeMemoryBottom - (UINTN)(*HobStart),
*HobStart
);