]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up DxeCore to remove duplicate memory allocation & device path utility services...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 27 Aug 2008 14:29:23 +0000 (14:29 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 27 Aug 2008 14:29:23 +0000 (14:29 +0000)
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

31 files changed:
MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c
MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
MdeModulePkg/Core/Dxe/Event/Event.c
MdeModulePkg/Core/Dxe/Event/ExecData.c
MdeModulePkg/Core/Dxe/Event/Timer.c
MdeModulePkg/Core/Dxe/Event/Tpl.c
MdeModulePkg/Core/Dxe/FwVol/Ffs.c
MdeModulePkg/Core/Dxe/FwVol/FwVol.c
MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c
MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
MdeModulePkg/Core/Dxe/FwVol/FwVolWrite.c
MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
MdeModulePkg/Core/Dxe/Gcd/Gcd.c
MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
MdeModulePkg/Core/Dxe/Hand/Handle.c
MdeModulePkg/Core/Dxe/Hand/Locate.c
MdeModulePkg/Core/Dxe/Hand/Notify.c
MdeModulePkg/Core/Dxe/Image/Image.c
MdeModulePkg/Core/Dxe/Image/ImageFile.c
MdeModulePkg/Core/Dxe/Library.h
MdeModulePkg/Core/Dxe/Library/Library.c
MdeModulePkg/Core/Dxe/Mem/MemData.c
MdeModulePkg/Core/Dxe/Mem/Page.c
MdeModulePkg/Core/Dxe/Mem/Pool.c
MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c
MdeModulePkg/Core/Dxe/Misc/InstallConfigurationTable.c
MdeModulePkg/Core/Dxe/Misc/SetWatchdogTimer.c
MdeModulePkg/Core/Dxe/Misc/Stall.c
MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c

index f4a448680f6d84c32e17fe046c1e253b30b82cea..e489547302fcfdb5283aff785361cc3fd88f2eeb 100644 (file)
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 //\r
 // Global stack used to evaluate dependency expressions\r
@@ -50,7 +50,7 @@ GrowDepexStack (
     Size = Size + (mDepexEvaluationStackEnd - mDepexEvaluationStack);\r
   }\r
 \r
-  NewStack = CoreAllocateBootServicesPool (Size * sizeof (BOOLEAN));\r
+  NewStack = AllocatePool (Size * sizeof (BOOLEAN));\r
   if (NewStack == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -68,7 +68,7 @@ GrowDepexStack (
     //\r
     // Free The Old Stack\r
     //\r
-    CoreFreePool (mDepexEvaluationStack);\r
+    FreePool (mDepexEvaluationStack);\r
   }\r
 \r
   //\r
index f00442684ea34feb92ccfe5edf0d07d6a49df4df..ba8734e1d6786f4bfe251fe5d40f5608fa5df107 100644 (file)
@@ -37,7 +37,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 //\r
 // The Driver List contains one copy of every driver that has been discovered.\r
@@ -638,7 +638,7 @@ FvIsBeingProcesssed (
 {\r
   KNOWN_HANDLE  *KnownHandle;\r
 \r
-  KnownHandle = CoreAllocateBootServicesPool (sizeof (KNOWN_HANDLE));\r
+  KnownHandle = AllocatePool (sizeof (KNOWN_HANDLE));\r
   ASSERT (KnownHandle != NULL);\r
 \r
   KnownHandle->Signature = KNOWN_HANDLE_SIGNATURE;\r
@@ -688,7 +688,7 @@ CoreFvToDevicePath (
     mFvDevicePath.End.SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;\r
     SetDevicePathNodeLength (&mFvDevicePath.End, sizeof (EFI_DEVICE_PATH_PROTOCOL));\r
 \r
-    FileNameDevicePath = CoreAppendDevicePath (\r
+    FileNameDevicePath = AppendDevicePath (\r
                             FvDevicePath,\r
                             (EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath\r
                             );\r
@@ -733,7 +733,7 @@ CoreAddToDriverList (
   // Create the Driver Entry for the list. ZeroPool initializes lots of variables to\r
   // NULL or FALSE.\r
   //\r
-  DriverEntry = CoreAllocateZeroBootServicesPool (sizeof (EFI_CORE_DRIVER_ENTRY));\r
+  DriverEntry = AllocateZeroPool (sizeof (EFI_CORE_DRIVER_ENTRY));\r
   ASSERT (DriverEntry != NULL);\r
 \r
   DriverEntry->Signature        = EFI_CORE_DRIVER_ENTRY_SIGNATURE;\r
@@ -876,7 +876,7 @@ CoreProcessFvImageFile (
     // ReadSection or Produce FVB failed, Free data buffer\r
     //\r
     if (Buffer != NULL) {\r
-      CoreFreePool (Buffer);\r
+      FreePool (Buffer);\r
     }\r
 \r
     if (AlignedBuffer != NULL) {\r
@@ -1043,7 +1043,7 @@ CoreFwVolEventProtocolNotify (
                 mFvDevicePath.End.SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;\r
                 SetDevicePathNodeLength (&mFvDevicePath.End, sizeof (EFI_DEVICE_PATH_PROTOCOL));\r
 \r
-                gDxeCoreLoadedImage->FilePath = CoreDuplicateDevicePath (\r
+                gDxeCoreLoadedImage->FilePath = DuplicateDevicePath (\r
                                                   (EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath\r
                                                   );\r
                 gDxeCoreLoadedImage->DeviceHandle = FvHandle;\r
index 5687ba1856ef98531d0f3eae09771145d9700f6c..acc675844a89d3bc41f8d3c236e14752d031f1d9 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 //\r
 // DXE Core Global Variables for Protocols from PEI\r
@@ -250,10 +250,10 @@ DxeMain (
   // Allocate the EFI System Table and EFI Runtime Service Table from EfiRuntimeServicesData\r
   // Use the templates to initialize the contents of the EFI System Table and EFI Runtime Services Table\r
   //\r
-  gDxeCoreST = CoreAllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
+  gDxeCoreST = AllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
   ASSERT (gDxeCoreST != NULL);\r
 \r
-  gDxeCoreRT = CoreAllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
+  gDxeCoreRT = AllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
   ASSERT (gDxeCoreRT != NULL);\r
 \r
   gDxeCoreST->RuntimeServices = gDxeCoreRT;\r
index 89a4c50b99eb4002ccc0dc3afa995a9a9bddd506..2043384f82ea93a8e8179ad5c9ac17d34a422ff2 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
 \r
 //\r
index 5cf54199edb451e43d5eb0d1c9454e84ed35f527..c05f99c2e797c9944378c17b12840e5550f9ca86 100644 (file)
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 \r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 //\r
 // Enumerate the valid types\r
index 13f8ff28e3aab71eba529421da927e6a7b025b78..66b62bfe3e90dd503c017bbc4c69737008f88c67 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 //\r
index 3eabbaabaade51f9cf4f329bdf73b8fb1ceb1bb2..de5b169472e34bfbf2684c688b9c2dd59e595d48 100644 (file)
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 \r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 //\r
 // Internal prototypes\r
index e99cb7355c40d5aa2f7c9387039b8adc0bc8a798..5eb4628cb1368e1b99328d296545d52845e52cda 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 /**\r
index 1375e6bf7db5aa2360859903f6f4584d286f3ff8..1c11dde036b0607e0926837c59ba1a4b941b54aa 100644 (file)
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 \r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 /**\r
index 8c91641834078ff290c02e0a574901327deeb13e..48b309fee9ad0eff542471e67395a6950505bd04 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 KEYSIZE       sizeof (UINTN)\r
 \r
@@ -87,7 +87,7 @@ GetFwVolHeader (
   //\r
   // Allocate a buffer for the caller\r
   //\r
-  *FwVolHeader = CoreAllocateBootServicesPool (TempFvh.HeaderLength);\r
+  *FwVolHeader = AllocatePool (TempFvh.HeaderLength);\r
   if (*FwVolHeader == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -210,7 +210,7 @@ FvCheck (
   // the header to check to make sure the volume is valid\r
   //\r
   Size = (UINTN)(FwVolHeader->FvLength - FwVolHeader->HeaderLength);\r
-  FvDevice->CachedFv = CoreAllocateBootServicesPool (Size);\r
+  FvDevice->CachedFv = AllocatePool (Size);\r
 \r
   if (FvDevice->CachedFv == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -336,7 +336,7 @@ FvCheck (
       //\r
       // Create a FFS list entry for each non-deleted file\r
       //\r
-      FfsFileEntry = CoreAllocateZeroBootServicesPool (sizeof (FFS_FILE_LIST_ENTRY));\r
+      FfsFileEntry = AllocateZeroPool (sizeof (FFS_FILE_LIST_ENTRY));\r
       if (FfsFileEntry == NULL) {\r
         Status = EFI_OUT_OF_RESOURCES;\r
         goto Done;\r
@@ -465,7 +465,7 @@ NotifyFwVolBlock (
       //\r
       // No FwVol protocol on the handle so create a new one\r
       //\r
-      FvDevice = CoreAllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);\r
+      FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);\r
       if (FvDevice == NULL) {\r
         return;\r
       }\r
index 1b629ddf1f78cc6dc66f58bd85e38a03f0340ea8..664c3af96721afcd17586b0f08caf938a7688ca1 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 /**\r
index 734692893435ce2b4dd5a4a926ec3fa2b2cb3c82..fbf6d0a1ba53a7492c01f80249ceafec0371672e 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 /*++\r
 \r
@@ -342,7 +342,7 @@ FvReadFile (
     //\r
     // Caller passed in a pointer so allocate buffer for them\r
     //\r
-    *Buffer = CoreAllocateBootServicesPool (FileSize);\r
+    *Buffer = AllocatePool (FileSize);\r
     if (*Buffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
index 6ff9bda0215f9b12d9a99e140c772fe3f33c9d7d..1e0263e844186ba8a9349e764fc928fefea8f4ad 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 \r
index 35926d3ee2a5cb1161d773bdaa1c949774ec400b..8d45105872ac3976df3a7fd2faf9c69d9e0b7111 100644 (file)
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 EFI_FW_VOL_BLOCK_DEVICE  mFwVolBlock = {\r
@@ -438,7 +438,7 @@ ProduceFVBProtocolOnBuffer (
   //\r
   // Allocate EFI_FW_VOL_BLOCK_DEVICE\r
   //\r
-  FvbDev = CoreAllocateCopyPool (sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);\r
+  FvbDev = AllocateCopyPool (sizeof (EFI_FW_VOL_BLOCK_DEVICE), &mFwVolBlock);\r
   if (FvbDev == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -460,7 +460,7 @@ ProduceFVBProtocolOnBuffer (
   //\r
   // Second, allocate the cache\r
   //\r
-  FvbDev->LbaCache = CoreAllocateBootServicesPool (FvbDev->NumBlocks * sizeof (LBA_CACHE));\r
+  FvbDev->LbaCache = AllocatePool (FvbDev->NumBlocks * sizeof (LBA_CACHE));\r
   if (FvbDev->LbaCache == NULL) {\r
     CoreFreePool (FvbDev);\r
     return EFI_OUT_OF_RESOURCES;\r
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
index 773165232fb8ed79559bc034f9b3e2581e4df341..9db124c9f3f672190342a4274af8d42e808aec67 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 //\r
@@ -72,7 +72,7 @@ CoreConnectController (
   //\r
   AlignedRemainingDevicePath = NULL;\r
   if (RemainingDevicePath != NULL) {\r
-    AlignedRemainingDevicePath = CoreDuplicateDevicePath (RemainingDevicePath);\r
+    AlignedRemainingDevicePath = DuplicateDevicePath (RemainingDevicePath);\r
   }\r
 \r
   //\r
@@ -137,7 +137,7 @@ CoreConnectController (
     //\r
     // Allocate a handle buffer for ControllerHandle's children\r
     //\r
-    ChildHandleBuffer = CoreAllocateBootServicesPool (ChildHandleCount * sizeof(EFI_HANDLE));\r
+    ChildHandleBuffer = AllocatePool (ChildHandleCount * sizeof(EFI_HANDLE));\r
 \r
     //\r
     // Fill in a handle buffer with ControllerHandle's children\r
@@ -376,7 +376,7 @@ CoreConnectSingleController (
   //\r
   // Allocate a duplicate array for the sorted Driver Binding Protocol Instances\r
   //\r
-  SortedDriverBindingProtocols = CoreAllocateBootServicesPool (sizeof (VOID *) * DriverBindingHandleCount);\r
+  SortedDriverBindingProtocols = AllocatePool (sizeof (VOID *) * DriverBindingHandleCount);\r
   if (SortedDriverBindingProtocols == NULL) {\r
     CoreFreePool (DriverBindingHandleBuffer);\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -707,7 +707,7 @@ CoreDisconnectController (
       goto Done;\r
     }\r
 \r
-    DriverImageHandleBuffer = CoreAllocateBootServicesPool (sizeof (EFI_HANDLE) * DriverImageHandleCount);\r
+    DriverImageHandleBuffer = AllocatePool (sizeof (EFI_HANDLE) * DriverImageHandleCount);\r
     if (DriverImageHandleBuffer == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Done;\r
@@ -789,7 +789,7 @@ CoreDisconnectController (
       ChildHandleValid = FALSE;\r
       ChildBuffer = NULL;\r
       if (ChildBufferCount != 0) {\r
-        ChildBuffer = CoreAllocateBootServicesPool (sizeof (EFI_HANDLE) * ChildBufferCount);\r
+        ChildBuffer = AllocatePool (sizeof (EFI_HANDLE) * ChildBufferCount);\r
         if (ChildBuffer == NULL) {\r
           Status = EFI_OUT_OF_RESOURCES;\r
           goto Done;\r
index d94fdde720a5d2b6da071cf588111dde7bffcafe..cfa103c0e5bcac1f01e2f3baa22137516a79c886 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 //\r
@@ -132,7 +132,7 @@ CoreFindProtocolEntry (
   // allocate a new entry\r
   //\r
   if ((ProtEntry == NULL) && Create) {\r
-    ProtEntry = CoreAllocateBootServicesPool (sizeof(PROTOCOL_ENTRY));\r
+    ProtEntry = AllocatePool (sizeof(PROTOCOL_ENTRY));\r
 \r
     if (ProtEntry != NULL) {\r
       //\r
@@ -393,7 +393,7 @@ CoreInstallProtocolInterfaceNotify (
   //\r
   // Allocate a new protocol interface structure\r
   //\r
-  Prot = CoreAllocateZeroBootServicesPool (sizeof(PROTOCOL_INTERFACE));\r
+  Prot = AllocateZeroPool (sizeof(PROTOCOL_INTERFACE));\r
   if (Prot == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Done;\r
@@ -404,7 +404,7 @@ CoreInstallProtocolInterfaceNotify (
   //\r
   Handle = (IHANDLE *)*UserHandle;\r
   if (Handle == NULL) {\r
-    Handle = CoreAllocateZeroBootServicesPool (sizeof(IHANDLE));\r
+    Handle = AllocateZeroPool (sizeof(IHANDLE));\r
     if (Handle == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Done;\r
@@ -1145,7 +1145,7 @@ CoreOpenProtocol (
   //\r
   // Create new entry\r
   //\r
-  OpenData = CoreAllocateBootServicesPool (sizeof(OPEN_PROTOCOL_DATA));\r
+  OpenData = AllocatePool (sizeof(OPEN_PROTOCOL_DATA));\r
   if (OpenData == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
   } else {\r
@@ -1331,7 +1331,7 @@ CoreOpenProtocolInformation (
     Size = Count * sizeof(EFI_OPEN_PROTOCOL_INFORMATION_ENTRY);\r
   }\r
 \r
-  Buffer = CoreAllocateBootServicesPool (Size);\r
+  Buffer = AllocatePool (Size);\r
   if (Buffer == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Done;\r
@@ -1434,7 +1434,7 @@ CoreProtocolsPerHandle (
     goto Done;\r
   }\r
 \r
-  Buffer = CoreAllocateBootServicesPool (sizeof (EFI_GUID *) * ProtocolCount);\r
+  Buffer = AllocatePool (sizeof (EFI_GUID *) * ProtocolCount);\r
   if (Buffer == NULL) {\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto Done;\r
@@ -1505,7 +1505,7 @@ CoreConnectHandlesByKey (
     }\r
   }\r
 \r
-  HandleBuffer = CoreAllocateBootServicesPool (Count * sizeof (EFI_HANDLE));\r
+  HandleBuffer = AllocatePool (Count * sizeof (EFI_HANDLE));\r
   if (HandleBuffer == NULL) {\r
     CoreReleaseProtocolLock ();\r
     return;\r
index 3bed845cf56df9162f714064589344900ab64d31..24f6e785a520aa2c6916703917ff7ab271b5f1ce 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 //\r
 // ProtocolRequest - Last LocateHandle request ID\r
@@ -450,12 +450,12 @@ CoreLocateDevicePath (
 \r
   *Device = NULL_HANDLE;\r
   SourcePath = *DevicePath;\r
-  SourceSize = CoreDevicePathSize (SourcePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
+  SourceSize = GetDevicePathSize (SourcePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
 \r
   //\r
   // The source path can only have 1 instance\r
   //\r
-  if (CoreIsDevicePathMultiInstance (SourcePath)) {\r
+  if (IsDevicePathMultiInstance (SourcePath)) {\r
     DEBUG((DEBUG_ERROR, "LocateDevicePath: Device path has too many instances\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -482,7 +482,7 @@ CoreLocateDevicePath (
     //\r
     // Check if DevicePath is first part of SourcePath\r
     //\r
-    Size = CoreDevicePathSize (TmpDevicePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
+    Size = GetDevicePathSize (TmpDevicePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
     if ((Size <= SourceSize) && CompareMem (SourcePath, TmpDevicePath, Size) == 0) {\r
       //\r
       // If the size is equal to the best match, then we\r
@@ -672,7 +672,7 @@ CoreLocateHandleBuffer (
     return Status;\r
   }\r
 \r
-  *Buffer = CoreAllocateBootServicesPool (BufferSize);\r
+  *Buffer = AllocatePool (BufferSize);\r
   if (*Buffer == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
index db3dfa1641aaabc165799b2654027f85da76827d..5f4ae191c240ef025ca70025e43caa8780b36d08 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 /**\r
@@ -132,7 +132,7 @@ CoreRegisterProtocolNotify (
     //\r
     // Allocate a new notification record\r
     //\r
-    ProtNotify = CoreAllocateBootServicesPool (sizeof(PROTOCOL_NOTIFY));\r
+    ProtNotify = AllocatePool (sizeof(PROTOCOL_NOTIFY));\r
     if (ProtNotify != NULL) {\r
 \r
       ProtNotify->Signature = PROTOCOL_NOTIFY_SIGNATURE;\r
index 54254879caebeaa40604d69731a46e4aba9f7bc3..4b651483448254df3d953ca18852ae6e88455f47 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 //\r
 // Module Globals\r
 //\r
@@ -340,7 +340,7 @@ CoreLoadPeImage (
   //\r
   if ((Attribute & EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION) != 0) {\r
     if (Image->ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER) {\r
-      Image->ImageContext.FixupData = CoreAllocateRuntimePool ((UINTN)(Image->ImageContext.FixupDataSize));\r
+      Image->ImageContext.FixupData = AllocateRuntimePool ((UINTN)(Image->ImageContext.FixupDataSize));\r
       if (Image->ImageContext.FixupData == NULL) {\r
         Status = EFI_OUT_OF_RESOURCES;\r
         goto Done;\r
@@ -444,7 +444,7 @@ CoreLoadPeImage (
       //\r
       // Make a list off all the RT images so we can let the RT AP know about them.\r
       //\r
-      Image->RuntimeData = CoreAllocateRuntimePool (sizeof(EFI_RUNTIME_IMAGE_ENTRY));\r
+      Image->RuntimeData = AllocateRuntimePool (sizeof(EFI_RUNTIME_IMAGE_ENTRY));\r
       if (Image->RuntimeData == NULL) {\r
         goto Done;\r
       }\r
@@ -685,7 +685,7 @@ CoreLoadImageCommon (
   //\r
   // Allocate a new image structure\r
   //\r
-  Image = CoreAllocateZeroBootServicesPool (sizeof(LOADED_IMAGE_PRIVATE_DATA));\r
+  Image = AllocateZeroPool (sizeof(LOADED_IMAGE_PRIVATE_DATA));\r
   if (Image == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -696,7 +696,7 @@ CoreLoadImageCommon (
   FilePath = OriginalFilePath;\r
   Status = CoreHandleProtocol (DeviceHandle, &gEfiDevicePathProtocolGuid, (VOID **)&HandleFilePath);\r
   if (!EFI_ERROR (Status)) {\r
-    FilePathSize = CoreDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
+    FilePathSize = GetDevicePathSize (HandleFilePath) - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
     FilePath = (EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *)FilePath) + FilePathSize );\r
   }\r
 \r
@@ -707,7 +707,7 @@ CoreLoadImageCommon (
   Image->Info.SystemTable  = gDxeCoreST;\r
   Image->Info.DeviceHandle = DeviceHandle;\r
   Image->Info.Revision     = EFI_LOADED_IMAGE_PROTOCOL_REVISION;\r
-  Image->Info.FilePath     = CoreDuplicateDevicePath (FilePath);\r
+  Image->Info.FilePath     = DuplicateDevicePath (FilePath);\r
   Image->Info.ParentHandle = ParentImageHandle;\r
 \r
 \r
@@ -774,7 +774,7 @@ CoreLoadImageCommon (
   // otherwise Loaded Image Device Path Protocol is installed with a NULL interface pointer.\r
   //\r
   if (OriginalFilePath != NULL) {\r
-    Image->LoadedImageDevicePath = CoreDuplicateDevicePath (OriginalFilePath);\r
+    Image->LoadedImageDevicePath = DuplicateDevicePath (OriginalFilePath);\r
   }\r
 \r
   //\r
@@ -1000,7 +1000,7 @@ CoreStartImage (
   // JumpContext must be aligned on a CPU specific boundary.\r
   // Overallocate the buffer and force the required alignment\r
   //\r
-  Image->JumpBuffer = CoreAllocateBootServicesPool (sizeof (BASE_LIBRARY_JUMP_BUFFER) + BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);\r
+  Image->JumpBuffer = AllocatePool (sizeof (BASE_LIBRARY_JUMP_BUFFER) + BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);\r
   if (Image->JumpBuffer == NULL) {\r
     PERF_END (ImageHandle, START_IMAGE_TOK, NULL, 0);\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -1322,7 +1322,7 @@ CoreExit (
   //\r
   if (ExitData != NULL) {\r
     Image->ExitDataSize = ExitDataSize;\r
-    Image->ExitData = CoreAllocateBootServicesPool (Image->ExitDataSize);\r
+    Image->ExitData = AllocatePool (Image->ExitDataSize);\r
     if (Image->ExitData == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Done;\r
index 3776e57513f94989370931a25eba2a7127b9a1a9..a95496f9c567707bfe84f965c4b695bd4c7bea94 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 /**\r
@@ -177,7 +177,7 @@ CoreOpenImageFile (
       // Because the device path consists of one or more FILE PATH MEDIA DEVICE PATH\r
       // nodes, It assures the fields in device path nodes are 2 byte aligned.\r
       //\r
-      FilePathNode = (FILEPATH_DEVICE_PATH *)CoreDuplicateDevicePath((EFI_DEVICE_PATH_PROTOCOL *)(UINTN)FilePathNode);\r
+      FilePathNode = (FILEPATH_DEVICE_PATH *)DuplicateDevicePath((EFI_DEVICE_PATH_PROTOCOL *)(UINTN)FilePathNode);\r
       if (FilePathNode == NULL) {\r
         FileHandle->Close (FileHandle);\r
         Status = EFI_OUT_OF_RESOURCES;\r
@@ -247,7 +247,7 @@ CoreOpenImageFile (
           //\r
           // Allocate space for the file\r
           //\r
-          ImageFileHandle->Source = CoreAllocateBootServicesPool ((UINTN)FileInfo->FileSize);\r
+          ImageFileHandle->Source = AllocatePool ((UINTN)FileInfo->FileSize);\r
           if (ImageFileHandle->Source != NULL) {\r
             //\r
             // Read the file into the buffer we allocated\r
@@ -453,7 +453,7 @@ CoreGrowBuffer (
       CoreFreePool (*Buffer);\r
     }\r
 \r
-    *Buffer = CoreAllocateBootServicesPool (BufferSize);\r
+    *Buffer = AllocatePool (BufferSize);\r
     if (*Buffer != NULL) {\r
       TryAgain = TRUE;\r
     } else {\r
index a3fce51a28706a8910f5c9c1a400374d7e3759d8..6e6ad3818b85c95f402710a1d41eebbdc0746519 100644 (file)
@@ -96,167 +96,6 @@ CoreReleaseLock (
   IN EFI_LOCK  *Lock\r
   );\r
 \r
-//\r
-// Device Path functions\r
-//\r
-\r
-\r
-/**\r
-  Calculate the size of a whole device path.\r
-\r
-  @param  DevicePath         The pointer to the device path data.\r
-\r
-  @return Size of device path data structure..\r
-\r
-**/\r
-UINTN\r
-CoreDevicePathSize (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-  );\r
-\r
-\r
-/**\r
-  Return TRUE is this is a multi instance device path.\r
-\r
-  @param  DevicePath         A pointer to a device path data structure.\r
-\r
-  @retval TRUE               If DevicePath is multi instance. FALSE - If\r
-                             DevicePath is not multi instance.\r
-\r
-**/\r
-BOOLEAN\r
-CoreIsDevicePathMultiInstance (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-  );\r
-\r
-\r
-\r
-/**\r
-  Duplicate a new device path data structure from the old one.\r
-\r
-  @param  DevicePath         A pointer to a device path data structure.\r
-\r
-  @return A pointer to the new allocated device path data.\r
-  @return Caller must free the memory used by DevicePath if it is no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreDuplicateDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
-  );\r
-\r
-\r
-/**\r
-  Function is used to append a Src1 and Src2 together.\r
-\r
-  @param  Src1               A pointer to a device path data structure.\r
-  @param  Src2               A pointer to a device path data structure.\r
-\r
-  @return A pointer to the new device path is returned.\r
-  @return NULL is returned if space for the new device path could not be allocated from pool.\r
-  @return It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreAppendDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src1,\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src2\r
-  );\r
-\r
-\r
-/**\r
-  Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateBootServicesPool (\r
-  IN  UINTN   AllocationSize\r
-  );\r
-\r
-\r
-/**\r
-  Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateZeroBootServicesPool (\r
-  IN  UINTN   AllocationSize\r
-  );\r
-\r
-\r
-/**\r
-  Find a config table by name in system table's ConfigurationTable.\r
-\r
-  @param  Guid           The table name to look for\r
-  @param  Table          Pointer of the config table\r
-\r
-  @retval EFI_NOT_FOUND  Could not find the table in system table's\r
-                         ConfigurationTable.\r
-  @retval EFI_SUCCESS    Table successfully found.\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetConfigTable (\r
-  IN EFI_GUID *Guid,\r
-  OUT VOID    **Table\r
-  );\r
-\r
-\r
-/**\r
-  Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-  @param  Buffer             Specified buffer that will be copy to the allocated\r
-                             pool\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimeCopyPool (\r
-  IN  UINTN   AllocationSize,\r
-  IN  VOID    *Buffer\r
-  );\r
-\r
-\r
-/**\r
-  Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimePool (\r
-  IN  UINTN   AllocationSize\r
-  );\r
-\r
-\r
-/**\r
-  Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-  @param  Buffer             Specified buffer that will be copy to the allocated\r
-                             pool\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateCopyPool (\r
-  IN  UINTN   AllocationSize,\r
-  IN  VOID    *Buffer\r
-  );\r
-\r
 \r
 /**\r
   Create a protocol notification event and return it.\r
index 18f0a9f589838154cebe6817069a8e77e00fa374..911fbb70b8a6f84d8fdeaeecdb42f299a7bd9d8d 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 UINTN mErrorLevel = DEBUG_ERROR | DEBUG_LOAD;\r
 \r
@@ -82,128 +82,9 @@ CoreReportProgressCode (
 }\r
 \r
 \r
-\r
-/**\r
-  Allocate pool of type EfiBootServicesData, the size is specified with AllocationSize.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateBootServicesPool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-{\r
-  VOID  *Memory;\r
-\r
-  CoreAllocatePool (EfiBootServicesData, AllocationSize, &Memory);\r
-  return Memory;\r
-}\r
-\r
-\r
-\r
-/**\r
-  Allocate pool of type EfiBootServicesData and zero it, the size is specified with AllocationSize.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateZeroBootServicesPool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-{\r
-  VOID  *Memory;\r
-\r
-  Memory = CoreAllocateBootServicesPool (AllocationSize);\r
-  ZeroMem (Memory, (Memory == NULL) ? 0 : AllocationSize);\r
-  return Memory;\r
-}\r
-\r
-\r
-\r
-/**\r
-  Allocate pool of specified size with EfiBootServicesData type, and copy specified buffer to this pool.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-  @param  Buffer             Specified buffer that will be copy to the allocated\r
-                             pool\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateCopyPool (\r
-  IN  UINTN   AllocationSize,\r
-  IN  VOID    *Buffer\r
-  )\r
-{\r
-  VOID  *Memory;\r
-\r
-  Memory = CoreAllocateBootServicesPool (AllocationSize);\r
-  CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);\r
-\r
-  return Memory;\r
-}\r
-\r
-\r
-\r
-\r
-/**\r
-  Allocate pool of type EfiRuntimeServicesData, the size is specified with AllocationSize.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimePool (\r
-  IN  UINTN   AllocationSize\r
-  )\r
-{\r
-  VOID  *Memory;\r
-\r
-  CoreAllocatePool (EfiRuntimeServicesData, AllocationSize, &Memory);\r
-  return Memory;\r
-}\r
-\r
-\r
-/**\r
-  Allocate pool of specified size with EfiRuntimeServicesData type, and copy specified buffer to this pool.\r
-\r
-  @param  AllocationSize     Size to allocate.\r
-  @param  Buffer             Specified buffer that will be copy to the allocated\r
-                             pool\r
-\r
-  @return Pointer of the allocated pool.\r
-\r
-**/\r
-VOID *\r
-CoreAllocateRuntimeCopyPool (\r
-  IN  UINTN   AllocationSize,\r
-  IN  VOID    *Buffer\r
-  )\r
-{\r
-  VOID  *Memory;\r
-\r
-  Memory = CoreAllocateRuntimePool (AllocationSize);\r
-  CopyMem (Memory, Buffer, (Memory == NULL) ? 0 : AllocationSize);\r
-\r
-  return Memory;\r
-}\r
-\r
-\r
-\r
 //\r
 // Lock Stuff\r
 //\r
-\r
-\r
 /**\r
   Initialize a basic mutual exclusion lock.   Each lock\r
   provides mutual exclusion access at it's task priority\r
@@ -290,159 +171,6 @@ CoreReleaseLock (
 }\r
 \r
 \r
-\r
-/**\r
-  Calculate the size of a whole device path.\r
-\r
-  @param  DevicePath         The pointer to the device path data.\r
-\r
-  @return Size of device path data structure..\r
-\r
-**/\r
-UINTN\r
-CoreDevicePathSize (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-  )\r
-{\r
-  EFI_DEVICE_PATH_PROTOCOL     *Start;\r
-\r
-  if (DevicePath == NULL) {\r
-    return 0;\r
-  }\r
-\r
-  //\r
-  // Search for the end of the device path structure\r
-  //\r
-  Start = DevicePath;\r
-  while (!EfiIsDevicePathEnd (DevicePath)) {\r
-    DevicePath = EfiNextDevicePathNode (DevicePath);\r
-  }\r
-\r
-  //\r
-  // Compute the size and add back in the size of the end device path structure\r
-  //\r
-  return ((UINTN) DevicePath - (UINTN) Start) + sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
-}\r
-\r
-\r
-\r
-/**\r
-  Return TRUE is this is a multi instance device path.\r
-\r
-  @param  DevicePath         A pointer to a device path data structure.\r
-\r
-  @retval TRUE               If DevicePath is multi instance. FALSE - If\r
-                             DevicePath is not multi instance.\r
-\r
-**/\r
-BOOLEAN\r
-CoreIsDevicePathMultiInstance (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath\r
-  )\r
-{\r
-  EFI_DEVICE_PATH_PROTOCOL *Node;\r
-\r
-  if (DevicePath == NULL) {\r
-    return FALSE;\r
-  }\r
-\r
-  Node = DevicePath;\r
-  while (!EfiIsDevicePathEnd (Node)) {\r
-    if (EfiIsDevicePathEndInstance (Node)) {\r
-      return TRUE;\r
-    }\r
-    Node = EfiNextDevicePathNode (Node);\r
-  }\r
-  return FALSE;\r
-}\r
-\r
-\r
-\r
-\r
-/**\r
-  Duplicate a new device path data structure from the old one.\r
-\r
-  @param  DevicePath         A pointer to a device path data structure.\r
-\r
-  @return A pointer to the new allocated device path data.\r
-  @return Caller must free the memory used by DevicePath if it is no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreDuplicateDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath\r
-  )\r
-{\r
-  EFI_DEVICE_PATH_PROTOCOL  *NewDevicePath;\r
-  UINTN                     Size;\r
-\r
-  if (DevicePath == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  //\r
-  // Compute the size\r
-  //\r
-  Size = CoreDevicePathSize (DevicePath);\r
-\r
-  //\r
-  // Allocate space for duplicate device path\r
-  //\r
-  NewDevicePath = CoreAllocateCopyPool (Size, DevicePath);\r
-\r
-  return NewDevicePath;\r
-}\r
-\r
-\r
-/**\r
-  Function is used to append a Src1 and Src2 together.\r
-\r
-  @param  Src1               A pointer to a device path data structure.\r
-  @param  Src2               A pointer to a device path data structure.\r
-\r
-  @return A pointer to the new device path is returned.\r
-  @return NULL is returned if space for the new device path could not be allocated from pool.\r
-  @return It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.\r
-\r
-**/\r
-EFI_DEVICE_PATH_PROTOCOL *\r
-CoreAppendDevicePath (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src1,\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *Src2\r
-  )\r
-{\r
-  UINTN                       Size;\r
-  UINTN                       Size1;\r
-  UINTN                       Size2;\r
-  EFI_DEVICE_PATH_PROTOCOL    *NewDevicePath;\r
-  EFI_DEVICE_PATH_PROTOCOL    *SecondDevicePath;\r
-\r
-  if (Src1 == NULL && Src2 == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  //\r
-  // Allocate space for the combined device path. It only has one end node of\r
-  // length EFI_DEVICE_PATH_PROTOCOL\r
-  //\r
-  Size1 = CoreDevicePathSize (Src1);\r
-  Size2 = CoreDevicePathSize (Src2);\r
-  Size = Size1 + Size2 - sizeof(EFI_DEVICE_PATH_PROTOCOL);\r
-\r
-  NewDevicePath = CoreAllocateCopyPool (Size, Src1);\r
-  if (NewDevicePath != NULL) {\r
-\r
-     //\r
-     // Over write Src1 EndNode and do the copy\r
-     //\r
-     SecondDevicePath = (EFI_DEVICE_PATH_PROTOCOL *)((CHAR8 *)NewDevicePath + (Size1 - sizeof(EFI_DEVICE_PATH_PROTOCOL)));\r
-     CopyMem (SecondDevicePath, Src2, Size2);\r
-  }\r
-\r
-  return NewDevicePath;\r
-}\r
-\r
-\r
 /**\r
   Create a protocol notification event and return it.\r
 \r
index a523fbc00a39df5e0ee694b5c9551e2a92104c5e..f7c6fbd55b321457f3e6eca3d378889981beb5a1 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 //\r
index 3159fbd3b36a499dc0d4756864eda79f3329efc6..b09f2f1304e1d562e2bbe490b2726aec2820db00 100644 (file)
@@ -12,7 +12,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 EFI_DEFAULT_PAGE_ALLOCATION_ALIGNMENT  (EFI_PAGE_SIZE)\r
 \r
index 5ad5edccc2e89ca93e07f5eccd3b83a39b8d1b2c..0691c4aba5869da76c99958eb4073f382cc05c63 100644 (file)
@@ -12,7 +12,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 POOL_FREE_SIGNATURE   EFI_SIGNATURE_32('p','f','r','0')\r
 typedef struct {\r
index 78f5073e3b7531fd7366dbf14e0a169583fd81e9..50e44683996350e833f76919035a8513a6be56c5 100644 (file)
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 EFI_DEBUG_IMAGE_INFO_TABLE_HEADER  mDebugInfoTableHeader = {\r
@@ -152,7 +152,7 @@ CoreNewDebugImageInfoEntry (
     //  Table is full, so re-allocate another page for a larger table...\r
     //\r
     TableSize = MaxTableIndex * EFI_DEBUG_TABLE_ENTRY_SIZE;\r
-    NewTable = CoreAllocateZeroBootServicesPool (TableSize + EFI_PAGE_SIZE);\r
+    NewTable = AllocateZeroPool (TableSize + EFI_PAGE_SIZE);\r
     if (NewTable == NULL) {\r
       mDebugInfoTableHeader.UpdateStatus &= ~EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS;\r
       return;\r
@@ -175,7 +175,7 @@ CoreNewDebugImageInfoEntry (
   //\r
   // Allocate data for new entry\r
   //\r
-  Table[Index].NormalImage = CoreAllocateZeroBootServicesPool (sizeof (EFI_DEBUG_IMAGE_INFO_NORMAL));\r
+  Table[Index].NormalImage = AllocateZeroPool (sizeof (EFI_DEBUG_IMAGE_INFO_NORMAL));\r
   if (Table[Index].NormalImage != NULL) {\r
     //\r
     // Update the entry\r
index 4eed6523b380bcacdb2678b9ce9b69f92557bd5e..34dc532752151428bf0e25609b2c2dac1fa4b564 100644 (file)
@@ -12,46 +12,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 #define CONFIG_TABLE_SIZE_INCREASED 0x10\r
 \r
 UINTN mSystemTableAllocateSize = 0;\r
 \r
-\r
-\r
-/**\r
-  Find a config table by name in system table's ConfigurationTable.\r
-\r
-  @param  Guid           The table name to look for\r
-  @param  Table          Pointer of the config table\r
-\r
-  @retval EFI_NOT_FOUND  Could not find the table in system table's\r
-                         ConfigurationTable.\r
-  @retval EFI_SUCCESS    Table successfully found.\r
-\r
-**/\r
-EFI_STATUS\r
-CoreGetConfigTable (\r
-  IN EFI_GUID *Guid,\r
-  OUT VOID    **Table\r
-  )\r
-{\r
-  UINTN Index;\r
-\r
-  for (Index = 0; Index < gDxeCoreST->NumberOfTableEntries; Index++) {\r
-    if (CompareGuid (Guid, &(gDxeCoreST->ConfigurationTable[Index].VendorGuid))) {\r
-      *Table = gDxeCoreST->ConfigurationTable[Index].VendorTable;\r
-      return EFI_SUCCESS;\r
-    }\r
-  }\r
-\r
-  return EFI_NOT_FOUND;\r
-}\r
-\r
-\r
-\r
-\r
 /**\r
   Boot Service called to add, modify, or remove a system configuration table from\r
   the EFI System Table.\r
@@ -149,7 +115,7 @@ CoreInstallConfigurationTable (
       // Allocate a table with one additional entry.\r
       //\r
       mSystemTableAllocateSize += (CONFIG_TABLE_SIZE_INCREASED * sizeof (EFI_CONFIGURATION_TABLE));\r
-      EfiConfigurationTable = CoreAllocateRuntimePool (mSystemTableAllocateSize);\r
+      EfiConfigurationTable = AllocateRuntimePool (mSystemTableAllocateSize);\r
       if (EfiConfigurationTable == NULL) {\r
         //\r
         // If a new table could not be allocated, then return an error.\r
index c7798133b1632b3989ff67be2b2c3371f2848d39..6465f2a514dd2c4183b0fee679d62e95f7f3cd18 100644 (file)
@@ -12,7 +12,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 WATCHDOG_TIMER_CALIBRATE_PER_SECOND 10000000\r
 \r
index 5608db014843533e04087fe2933aef269af3da18..96d9b339cf9db2a98874997855ccfaa5dddca3cd 100644 (file)
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 // Include statements\r
 //\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 \r
index 1660b9da071cbcca60224636e7aaef2ac217f7e7..a7a4509bb17ea6b02e8f52636a489b1f91f5fb38 100644 (file)
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 //\r
 // Local defines and typedefs\r
@@ -607,7 +607,7 @@ GetSection (
     //\r
     // Callee allocated buffer.  Allocate buffer and return size.\r
     //\r
-    *Buffer = CoreAllocateBootServicesPool (CopySize);\r
+    *Buffer = AllocatePool (CopySize);\r
     if (*Buffer == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto GetSection_Done;\r
@@ -918,7 +918,7 @@ CreateChildNode (
   //\r
   // Allocate a new node\r
   //\r
-  *ChildNode = CoreAllocateBootServicesPool (sizeof (CORE_SECTION_CHILD_NODE));\r
+  *ChildNode = AllocatePool (sizeof (CORE_SECTION_CHILD_NODE));\r
   Node = *ChildNode;\r
   if (Node == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -951,7 +951,7 @@ CreateChildNode (
       //\r
       if (CompressionHeader->UncompressedLength > 0) {\r
         NewStreamBufferSize = CompressionHeader->UncompressedLength;\r
-        NewStreamBuffer = CoreAllocateBootServicesPool (NewStreamBufferSize);\r
+        NewStreamBuffer = AllocatePool (NewStreamBufferSize);\r
         if (NewStreamBuffer == NULL) {\r
           CoreFreePool (Node);\r
           return EFI_OUT_OF_RESOURCES;\r
@@ -984,7 +984,7 @@ CreateChildNode (
           ASSERT_EFI_ERROR (Status);\r
           ASSERT (NewStreamBufferSize == CompressionHeader->UncompressedLength);\r
 \r
-          ScratchBuffer = CoreAllocateBootServicesPool (ScratchSize);\r
+          ScratchBuffer = AllocatePool (ScratchSize);\r
           if (ScratchBuffer == NULL) {\r
             CoreFreePool (Node);\r
             CoreFreePool (NewStreamBuffer);\r
@@ -1202,7 +1202,7 @@ OpenSectionStreamEx (
   //\r
   // Allocate a new stream\r
   //\r
-  NewStream = CoreAllocateBootServicesPool (sizeof (CORE_SECTION_STREAM_NODE));\r
+  NewStream = AllocatePool (sizeof (CORE_SECTION_STREAM_NODE));\r
   if (NewStream == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -1213,7 +1213,7 @@ OpenSectionStreamEx (
     // data in\r
     //\r
     if (SectionStreamLength > 0) {\r
-      NewStream->StreamBuffer = CoreAllocateBootServicesPool (SectionStreamLength);\r
+      NewStream->StreamBuffer = AllocatePool (SectionStreamLength);\r
       if (NewStream->StreamBuffer == NULL) {\r
         CoreFreePool (NewStream);\r
         return EFI_OUT_OF_RESOURCES;\r
@@ -1473,7 +1473,7 @@ CustomGuidedSectionExtract (
     //\r
     // Allocate scratch buffer\r
     //\r
-    ScratchBuffer = CoreAllocateBootServicesPool (ScratchBufferSize);\r
+    ScratchBuffer = AllocatePool (ScratchBufferSize);\r
     if (ScratchBuffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
@@ -1483,7 +1483,7 @@ CustomGuidedSectionExtract (
     //\r
     // Allocate output buffer\r
     //\r
-    AllocatedOutputBuffer = CoreAllocateBootServicesPool (OutputBufferSize);\r
+    AllocatedOutputBuffer = AllocatePool (OutputBufferSize);\r
     if (AllocatedOutputBuffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r