From: Liming Gao <liming.gao@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>
Subject: [Patch 2/2] MdeModulePkg SectionExtractionPei: remove the hard code alignment adjustment
Date: Wed, 10 Jan 2018 13:33:30 +0800 [thread overview]
Message-ID: <1515562410-2820-3-git-send-email-liming.gao@intel.com> (raw)
In-Reply-To: <1515562410-2820-1-git-send-email-liming.gao@intel.com>
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>
---
| 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
--git a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c
index c4a3508..63fc94c 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 (
--
2.8.0.windows.1
next prev parent reply other threads:[~2018-01-10 5:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 5:33 [Patch 0/2] MdeModulePkg: Remove the hard code alignment adjustment Liming Gao
2018-01-10 5:33 ` [Patch 1/2] MdeModulePkg DxeIpl: remove " Liming Gao
2018-01-10 5:37 ` Zeng, Star
2018-01-10 5:39 ` Gao, Liming
2018-01-10 5:46 ` Zeng, Star
2018-01-10 5:33 ` Liming Gao [this message]
2018-01-10 5:48 ` [Patch 2/2] MdeModulePkg SectionExtractionPei: " Zeng, Star
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1515562410-2820-3-git-send-email-liming.gao@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox