From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.14944.1653530238995343189 for ; Wed, 25 May 2022 18:57:22 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=K2vcRBOU; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: bob.c.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653530240; x=1685066240; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+uU910w+OMrkWKDPMzsmRkJNBfSppdfKoH/PdqRKx7s=; b=K2vcRBOU+0fSmMAbvi8KuyfOKMnXuZc8WnMDLLD+3ekfhxS370lFOjo2 HeQUDy+gsv6QPR23jZNKgpNxog/Kulik6LwURMGoRGL4R+njDHqJs6cm9 YRcVvttowm59OOoKUSV640yYKYF2YTD8Cr0FYZ1Ayr5+iQs/6vd74Lsh0 xu6oqoQ1jxu5qvZ6LCYND1O9xLc5EY0Ilx4V5JN1sOXU9fc+6v7E86alH DpSrSM6dqQhbnqphZtdWrHJDW64vadoFjEvkyVv+rTzj3xWk3HGZCp4Ae eYOBGM8f/ZiCgMj1KyknjKsxAee5FlEmguAHinC8vNecEyISGnCVqqMOc w==; X-IronPort-AV: E=McAfee;i="6400,9594,10358"; a="274099568" X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="274099568" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 May 2022 18:57:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="527137858" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga003.jf.intel.com with ESMTP; 25 May 2022 18:57:16 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 25 May 2022 18:57:15 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 25 May 2022 18:57:15 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 25 May 2022 18:57:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E9aVCyIRRxUTNvUEmc8fjyt4nD7L9nOkJvRPSYTsqmF1fVbCggErFfS4j1u19LGZv+pO2Vd/dn8cQrC+OgKsZ+2WovT/l7lnNAYRptsoSX2l+n18yO12cir6F3Hnpff81ZPryD+m82MlLb2icRjPTDByAXFHwBsj0rdDisyT8dYNlXW4Di5S821NfM6lkwCL0XP2Q87/zC8CbSM8hf4qzH0XHd2n+6ONafDAK033GnDhgkP6IXU5gFOPNDE2HKnmxGHlzhlcN9m3S/RqY+f7FKwx5/+y3R3q3xdD8jWr7Ar0VCzIKjwJ+JgZc6aGkvUwyTGJ0pOURcoRS+CJB4tSPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1ob50z6PeKGcN1Hwm3iS/U4PJwQmaJA3jFufAVfkRAg=; b=LeKAoZHPs6gYsJYuQ1Ap1xqvTar9M6AllH/D0A9fHZDnDv3sFIGfB4crlg/uX/E4q7OIbf9KKHrbOqD28cvsy/Cl3zk5/RvU3ihU6BcGNgskYMfwpKxLcWhiANheBjlTQV1wxuJJLMkSxb9VuUnCgTe6dbprRrUDMZLIhNinPXjLtCkRWD2gL3RQiOczN7q7E09Fmjzi0BURpu2o3EeKXcVwKQh7Hbh1K+4M/1rOIXPnic3EBRm4NrwM190FjiX9BxFsBPs6C9mU09SVbKXl49hUVe5Wa9pLwfdlhhQ72HGA64etR7xG1/Usk/ea40UUM4PAqTArupFuckgkuWhRzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB5863.namprd11.prod.outlook.com (2603:10b6:510:135::11) by BL3PR11MB6315.namprd11.prod.outlook.com (2603:10b6:208:3b2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Thu, 26 May 2022 01:56:43 +0000 Received: from PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::4d85:900e:e547:4ba0]) by PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::4d85:900e:e547:4ba0%7]) with mapi id 15.20.5293.013; Thu, 26 May 2022 01:56:43 +0000 From: "Bob Feng" To: "Yang, Jie" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Chen, Christine" Subject: Re: [PATCH] [edk2-staging] [PATCH] BaseTools/Bfm: Fix "-g" input FV is not BFV issue Thread-Topic: [PATCH] [edk2-staging] [PATCH] BaseTools/Bfm: Fix "-g" input FV is not BFV issue Thread-Index: AQHYa1mI6ZlY9cImWk+u8tgInC0F660wcODQ Date: Thu, 26 May 2022 01:56:43 +0000 Message-ID: References: <20220519082137.2330-1-jie.yang@intel.com> In-Reply-To: <20220519082137.2330-1-jie.yang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 74a5f319-a275-4ced-0a3d-08da3ebafbce x-ms-traffictypediagnostic: BL3PR11MB6315:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PcTCdwY2GtaidfIQDsmUUmCa3bdXIjZAnqjSaSsAK5pzRHpoFdHkLO9sUxr0PHkXGWZuXKuINTHVdYfB9vVt8EZKNRrY2V0EyZLtW9qmqrzRXQQtFADd96UxzqLx37rgSc4U/aRl7Gjwyb4+L0WsxiDH+DMQQhBCTaCT6KZgUnp4HjDTa7gN8o7J6YC7I5YqaXDpVFQ1BP2BAlkbBDqk7/RgSR4qElMmHGWzbVSQUcXeHFZAOSAbIibegH48GGy5rcD/5hYTVDfjf7v+ZfeOKq+88uoBDXX+wcpwTOGiooeq7hf21gyQzkXPCCWyizZwEStUHZ07LIsTO76A68lWEzzezprGeCanRiKpAqVbXZfNG1rD+sS+BuaHlmNYXzfR06PAY+m+xKif8ri+w0eZ1Eb9d1mW8S8Wa4o8qrNmRTtmfXdfEcVIz2o7MAVWu1syNk6qZgATwBERQbFPV34NWvEnM5CVwNIA/iL5LyOY98+Z2/G5TnW8dePXAoT3Ck8cEjY1RdfjFYIhcFnckGXXidr5Uzjm6ppXm5aDKfc7SL68iQknVIWD670dvonTDWO7PjaNndt065qaIl++Sn1v/btv0hExQ+zKnw7P44qIqvffDPVDOLpMF1SwVQ5E5k62pD6VwKsK86RmjMlYb9ToD664SaQYYZEHVnpoKrKg/fkaeE7wCRv90SIBYVZtTqcfZbN7rDNJRrnRqMrDsshl3g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5863.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(82960400001)(38100700002)(508600001)(71200400001)(52536014)(33656002)(5660300002)(2906002)(8936002)(316002)(55016003)(54906003)(107886003)(186003)(110136005)(38070700005)(122000001)(9686003)(7696005)(6506007)(26005)(66946007)(66556008)(66446008)(86362001)(66476007)(64756008)(4326008)(76116006)(53546011)(83380400001)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Ni9s9w8H/MRMstQopKg7462isB9s+Ce080qTIsvPCWgx2PEFxLyXX+si2SCl?= =?us-ascii?Q?5jkFTJ4RGi69SrXEiM8xJro+UT5RKuXAwoB+0gdq3ClZEvJHUV3YYbq1QESL?= =?us-ascii?Q?D1bCPwpPVDjQPqJDSjuBdbMAhCtw3nQsodZGvRibrCETNt6TcRl5wXMDBAI9?= =?us-ascii?Q?piwkEzm7N2lE8BmE/hjjDOEPbHt+Ga9xtokTY8V1oVXXbvEvHAXZ1fH2MGcx?= =?us-ascii?Q?auANkukivtPyMT52+U3mZa+Zlv8MlOrtK9wwY5CcEUMvrEJSv8vsVfP8pRja?= =?us-ascii?Q?6xhTMbp2eylzvBuZVCZ7prjXmBF3C0sYPezziIIC8UO1NooBuQtE4VW8hdz1?= =?us-ascii?Q?/r5ddRFK2aFmx6NFj+skSXKyp+CEk2Jz+UVPPv2ZW5OA0ptbYcOgJuC6g89p?= =?us-ascii?Q?WU5RhZbbkaLPYZlHeMUJGHOmqCn4gIgyBEql5lwzKEvc+RVCWIUomkAp91SL?= =?us-ascii?Q?/vMuRs7wvpb2aHs/+7M/99PHBgfiAfgy+jwa85JcQLKjj6wfewPmYoULt2BC?= =?us-ascii?Q?4erlHn7F8tIfFc2hS9lAIXmG55mAiCZY4sfxx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JrcmYdpQ3KDquyL1j6VFp9Ha52dWPX5J4q/r1E7?= =?us-ascii?Q?TDgK6HNEQDjgixn+VcsgcI4PvfQMRNvxtRXJDAh1RyFbnLcnLk9uiahchyDf?= =?us-ascii?Q?qSaLDQZ4dR0ds95Lj5vvxSYLpK0mx/U4oDXYtevgKA6mC99UDGbQjBPlahA+?= =?us-ascii?Q?9i8gU5JgzTTI68qAIcEPg0MirOlqbB5JHUbWpXivAhQ4wHX/tzRD0pnZX+47?= =?us-ascii?Q?2KV7Ppfa5qmdWOGKa+/yq16rN8zdSR1puDaxnU4JsbZMy5JROqThgQA8uN9R?= =?us-ascii?Q?cO24oTGb6g=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5863.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74a5f319-a275-4ced-0a3d-08da3ebafbce X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2022 01:56:43.4656 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lOaSirgKzQZEy3W8GxZ0r+7lD5+wJSG6F96VCNRXft6tCGV7hZNbIszP9ZBLgWgDjRe12/WI7VXi76CWRUw02Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6315 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: Yang, Jie =20 Sent: Thursday, May 19, 2022 4:22 PM To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming ; Chen, Christine ; Yang, Jie Subject: [PATCH] [edk2-staging] [PATCH] BaseTools/Bfm: Fix "-g" input FV is= not BFV issue FCE tool provides "-g" parameter to indicate which FV to insert binaries. C= urrent code logic has some defects when this FV is not the last BFV, this p= atch is to fix this issue and enhance this tool. Signed-off-by: jie.yang Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/C/BfmLib/BinFileManager.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/BfmLib/BinFileManager.c b/BaseTools/Source/= C/BfmLib/BinFileManager.c index 69521044b8..42953bfce5 100644 --- a/BaseTools/Source/C/BfmLib/BinFileManager.c +++ b/BaseTools/Source/C/BfmLib/BinFileManager.c @@ -2,7 +2,7 @@ The main entry of BFM tool. - Copyright (c) 2011-2019, Intel Corporation= . All rights reserved.
+ Copyright (c) 2011-2022, Intel Corporation. All= rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/@@ = -310,7 +310,10 @@ BfmImageAdd ( do { if ((FvGuidExisted && mFvGuidIsSet && FvInFd->IsInputFvFlag) ||= ((!FvGuidExisted || (!mFvGuidIsSet)) && FvInFd->IsBfvFlag)) { - if (F= vInFd->IsBfvFlag) {+ if (FvInFd->IsBfvFlag && !FvGuidExisted) {+ = //+ // No target FV is set, find the last BFV to insert Binary+ = // FvInFdTmp =3D FdData->Fv; while (FvInFdTmp !=3D NUL= L) { if (FvInFdTmp->IsBfvFlag) {--=20 2.26.2.windows.1