From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4a::61b]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 04F941A1DF9 for ; Sun, 14 Aug 2016 08:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HqbIgWC1RNtFBZqa9mmd/MYIwnaFZYlpjVbWFGhRr0E=; b=TEtOqEPDDsNAkDxMsXCrsAfv3DIpEhqww6vGlDexHlqeeV76yeU8ckYXuErf+8XP9C3Yti3bGISYLdsCPYoyY5AB5bAq4Pupxb9TRSqw8TEFH/pUJm+2bGnTsHPu7XSJ7ll/1sD9fO/uSUHtsLdQUgm/xLOv5jRS4p5LGLZpOh4= Received: from DM5PR12MB1243.namprd12.prod.outlook.com (10.168.237.22) by DM5PR12MB1244.namprd12.prod.outlook.com (10.168.237.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Sun, 14 Aug 2016 15:05:55 +0000 Received: from DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) by DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) with mapi id 15.01.0549.025; Sun, 14 Aug 2016 15:05:55 +0000 From: "Duran, Leo" To: "Gao, Liming" , "Zhu, Yonghong" CC: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools/Source/C/GenFv/GenFvInternalLib.c Thread-Index: AQHR8+SHkYUguXDTW06ZFcKWmFIG6qBD4McAgAEfioCAA5FRcA== Date: Sun, 14 Aug 2016 15:05:55 +0000 Message-ID: References: <1470928996-4545-1-git-send-email-leo.duran@amd.com> <1470928996-4545-2-git-send-email-leo.duran@amd.com> <4A89E2EF3DFEDB4C8BFDE51014F606A1155EAC43@shsmsx102.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A1155EAC43@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; x-originating-ip: [24.55.49.175] x-ms-office365-filtering-correlation-id: 7679c895-35e2-49d3-f388-08d3c4547de2 x-microsoft-exchange-diagnostics: 1; DM5PR12MB1244; 20:rc1T0v6AP4oj6w12Kwe0dvpztqs7ftMc2n9WLQzkP71HW3o83O2jYFIL969PEpASLXq6E99Iao/Bj1HB9wzoZddD0S/5YHq+k+3zZ3Jl4tij+dx1Mvf1R8oQL8PrNGC7zcuyOyoD1inklrt14DQZ9684Mbd5v+7InWs96Ook+W4iCgtydCrTT/YIE5PzgSlK4xLEsTSBG5CAsOWCp2MpWkuNUM02pfCoftSLvJ4WwJiNwLfRZyoYe/iyF5dDcQG2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1244; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DM5PR12MB1244; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1244; x-forefront-prvs: 00342DD5BC x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6029001)(6009001)(7916002)(43784003)(57704003)(377454003)(199003)(189002)(13464003)(87936001)(586003)(101416001)(3846002)(66066001)(6116002)(19580395003)(97736004)(3660700001)(86362001)(19580405001)(122556002)(2906002)(5002640100001)(4326007)(68736007)(3280700002)(8936002)(50986999)(33656002)(77096005)(76576001)(2900100001)(54356999)(102836003)(76176999)(74316002)(99286002)(5001770100001)(106356001)(92566002)(2950100001)(106116001)(105586002)(7736002)(9686002)(11100500001)(8676002)(10400500002)(7696003)(81156014)(189998001)(7846002)(81166006)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1244; H:DM5PR12MB1243.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Aug 2016 15:05:55.5502 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1244 Subject: Re: [PATCH] BaseTools/Source/C/GenFv/GenFvInternalLib.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2016 15:05:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Gao, Liming [mailto:liming.gao@intel.com] > Sent: Friday, August 12, 2016 3:32 AM > To: Duran, Leo ; edk2-devel@lists.01.org > Cc: Zhu, Yonghong > Subject: RE: [PATCH] BaseTools/Source/C/GenFv/GenFvInternalLib.c >=20 > Duran: > Reusing FvForceRebase flag is a good idea to resolve this issue. I agre= e your > change. Reviewed-by: Liming Gao >=20 [Duran, Leo]=20 Excellent, thanks! Please advise on "next steps": 1) Do we need a reply from Yonghong Zhu? 2) When would it be reasonable to expect integration of this code into main= line? Thanks again, Leo. > Thank > Liming > > -----Original Message----- > > From: Leo Duran [mailto:leo.duran@amd.com] > > Sent: Thursday, August 11, 2016 11:23 PM > > To: edk2-devel@lists.01.org > > Cc: Zhu, Yonghong ; Gao, Liming > > ; Leo Duran > > Subject: [PATCH] BaseTools/Source/C/GenFv/GenFvInternalLib.c > > > > 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 =3D $(FV_BOOT_BASE) > > FvForceRebase =3D TRUE > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Leo Duran > > --- > > 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 mus= t have > the > > - // EndAddress of 0xFFFFFFFF. Thus, only this type fv needs to up= date > the > > - // reset vector. If the PEI Core is found, the VTF file will pro= bably 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) =3D=3D > > FV_IMAGES_TOP_ADDRESS) { > > + if ((mFvDataInfo.ForceRebase =3D=3D 1) || > > + (mFvDataInfo.BaseAddress + mFvDataInfo.Size) =3D=3D > > FV_IMAGES_TOP_ADDRESS) { > > Status =3D UpdateResetVector (&FvImageMemoryFile, &mFvDataInfo= , > > VtfFileImage); > > if (EFI_ERROR(Status)) { > > Error (NULL, 0, 3000, "Invalid", "Could not update the > > reset vector."); > > -- > > 1.9.1