]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c
MdeModulePkg SectionExtractionPei: remove the hard code alignment adjustment
[mirror_edk2.git] / MdeModulePkg / Universal / SectionExtractionPei / SectionExtractionPei.c
index c4a3508fbd2b91998a78205034a83744de350577..63fc94cb5146232839efbe20670088487f7fb1d4 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
  Section Extraction PEIM\r
 \r
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -194,16 +194,11 @@ CustomGuidedSectionExtract (
     //\r
     // Allocate output buffer\r
     //\r
-    *OutputBuffer = AllocatePages (EFI_SIZE_TO_PAGES (OutputBufferSize) + 1);\r
+    *OutputBuffer = AllocatePages (EFI_SIZE_TO_PAGES (OutputBufferSize));\r
     if (*OutputBuffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
     DEBUG ((DEBUG_INFO, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer));\r
-    //\r
-    // *OutputBuffer still is one section. Adjust *OutputBuffer offset, \r
-    // skip EFI section header to make section data at page alignment.\r
-    //\r
-    *OutputBuffer = (VOID *)((UINT8 *) *OutputBuffer + EFI_PAGE_SIZE - sizeof (EFI_COMMON_SECTION_HEADER));\r
   }\r
   \r
   Status = ExtractGuidedSectionDecode (\r