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