]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
Clean up DxeCore to remove duplicate memory allocation & device path utility services...
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Dispatcher / Dispatcher.c
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