]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg DxeIpl: remove the hard code alignment adjustment.
authorLiming Gao <liming.gao@intel.com>
Wed, 10 Jan 2018 05:33:29 +0000 (13:33 +0800)
committerLiming Gao <liming.gao@intel.com>
Fri, 19 Jan 2018 05:20:24 +0000 (13:20 +0800)
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>
MdeModulePkg/Core/DxeIplPeim/DxeLoad.c

index 1f626a9e8658211e07ea49e898cc7a0a5ede0f61..f4d752898554b199a2b05791eb368cf4e0c0475f 100644 (file)
@@ -3,7 +3,7 @@
   Responsibility of this module is to load the DXE Core from a Firmware Volume.\r
 \r
 Copyright (c) 2016 HP Development Company, L.P.\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 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
@@ -593,16 +593,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