X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FGenFv%2FGenFvInternalLib.c;h=123e3550dd97d027685ba33d3d6a2649b98509a4;hp=7c839e277944db70007060c2c07315e2e6db53cd;hb=adb6ac256338329883e4d8fafaa8c753dba707c9;hpb=62b8b5be713dd1f801cd44e4eb28f68585a9bd85 diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c index 7c839e2779..123e3550dd 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.");