From: Leo Duran <leo.duran@amd.com>
To: <edk2-devel@lists.01.org>
Cc: <yonghong.zhu@intel.com>, <liming.gao@intel.com>,
Leo Duran <leo.duran@amd.com>
Subject: [PATCH] BaseTools/Source/C/GenFv/GenFvInternalLib.c
Date: Thu, 11 Aug 2016 10:23:16 -0500 [thread overview]
Message-ID: <1470928996-4545-2-git-send-email-leo.duran@amd.com> (raw)
In-Reply-To: <1470928996-4545-1-git-send-email-leo.duran@amd.com>
Account for rebase of FV section containing VTF file on IA32/IA64.
This supports cases where the reset vector may not be set at 0xFFFFFFF0.
For example, FV section defined as:
[FV.FvSecPei]
FvBaseAddress = $(FV_BOOT_BASE)
FvForceRebase = TRUE
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
---
BaseTools/Source/C/GenFv/GenFvInternalLib.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 7c839e2..8c2827b 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -2770,11 +2770,13 @@ Returns:
//
// Update reset vector (SALE_ENTRY for IPF)
// Now for IA32 and IA64 platform, the fv which has bsf file must have the
- // EndAddress of 0xFFFFFFFF. Thus, only this type fv needs to update the
- // reset vector. If the PEI Core is found, the VTF file will probably get
- // corrupted by updating the entry point.
+ // EndAddress of 0xFFFFFFFF (unless the section was rebased).
+ // Thus, only this type fv needs to update the reset vector.
+ // If the PEI Core is found, the VTF file will probably get
+ // corrupted by updating the entry point.
//
- if ((mFvDataInfo.BaseAddress + mFvDataInfo.Size) == FV_IMAGES_TOP_ADDRESS) {
+ if ((mFvDataInfo.ForceRebase == 1) ||
+ (mFvDataInfo.BaseAddress + mFvDataInfo.Size) == FV_IMAGES_TOP_ADDRESS) {
Status = UpdateResetVector (&FvImageMemoryFile, &mFvDataInfo, VtfFileImage);
if (EFI_ERROR(Status)) {
Error (NULL, 0, 3000, "Invalid", "Could not update the reset vector.");
--
1.9.1
next prev parent reply other threads:[~2016-08-11 15:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 15:23 [PATCH] BaseTools/Source/C/GenFv/GenFvInternalLib.c Leo Duran
2016-08-11 15:23 ` Leo Duran [this message]
2016-08-12 8:32 ` Gao, Liming
2016-08-14 15:05 ` Duran, Leo
2016-08-14 19:24 ` Ard Biesheuvel
2016-08-15 0:15 ` Zhu, Yonghong
2016-08-15 13:13 ` Duran, Leo
2016-08-15 15:16 ` Gao, Liming
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=1470928996-4545-2-git-send-email-leo.duran@amd.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