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>
/** @file\r
Section Extraction PEIM\r
\r
/** @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
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
//\r
// Allocate output buffer\r
//\r
//\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
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
}\r
\r
Status = ExtractGuidedSectionDecode (\r