From 5367f17db4727a4d43ae3ab519c944e61463716d Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Wed, 10 Jan 2018 13:33:29 +0800 Subject: MdeModulePkg DxeIpl: 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 Cc: Star Zeng Reviewed-by: Star Zeng --- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'MdeModulePkg/Core') diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 1f626a9e86..f4d7528985 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -3,7 +3,7 @@ Responsibility of this module is to load the DXE Core from a Firmware Volume. Copyright (c) 2016 HP Development Company, L.P. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
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 @@ -593,16 +593,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 ( -- cgit v1.2.3