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