summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-01-10 13:33:30 +0800
committerLiming Gao <liming.gao@intel.com>2018-01-19 13:20:20 +0800
commitbc6a7a27ce119c256c4cd10111a7eb7917382e73 (patch)
tree81b19ff90d5c0fe40088cd89a63fdd0c8c8f278f /MdeModulePkg
parentf21547ff64a58909c85ce215531345f6f8364884 (diff)
downloadedk2-bc6a7a27ce119c256c4cd10111a7eb7917382e73.tar.gz
edk2-bc6a7a27ce119c256c4cd10111a7eb7917382e73.tar.bz2
edk2-bc6a7a27ce119c256c4cd10111a7eb7917382e73.zip
MdeModulePkg SectionExtractionPei: remove the hard code alignment adjustment
Section data alignment should be made in the build generation. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c
index c4a3508fbd..63fc94cb51 100644
--- a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c
+++ b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c
@@ -1,7 +1,7 @@
/** @file
Section Extraction PEIM
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -194,16 +194,11 @@ CustomGuidedSectionExtract (
//
// Allocate output buffer
//
- *OutputBuffer = AllocatePages (EFI_SIZE_TO_PAGES (OutputBufferSize) + 1);
+ *OutputBuffer = AllocatePages (EFI_SIZE_TO_PAGES (OutputBufferSize));
if (*OutputBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
DEBUG ((DEBUG_INFO, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer));
- //
- // *OutputBuffer still is one section. Adjust *OutputBuffer offset,
- // skip EFI section header to make section data at page alignment.
- //
- *OutputBuffer = (VOID *)((UINT8 *) *OutputBuffer + EFI_PAGE_SIZE - sizeof (EFI_COMMON_SECTION_HEADER));
}
Status = ExtractGuidedSectionDecode (