From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.19466.1605671277105640765 for ; Tue, 17 Nov 2020 19:47:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=cxUbq/Ah; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: star.zeng@intel.com) IronPort-SDR: ALIfM8ZUl84N9nR3Iuzftk7dLUZ00eam6VoHPmHJP6dAIm8FlWRZzSQhe5yg72KO++QpvdQoav z5JSts9JeVIA== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="158834492" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="158834492" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 19:47:56 -0800 IronPort-SDR: H4A3vgCUNNc6kaSuqXrgfMceKPj/PGcGT5uW6+ltkHq7jKJS19sImEvUtEvRzuYiNi8bJOBlS9 9RykX6eQh0BQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="341117069" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga002.jf.intel.com with ESMTP; 17 Nov 2020 19:47:56 -0800 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 17 Nov 2020 19:47:55 -0800 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 17 Nov 2020 19:47:55 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 17 Nov 2020 19:47:55 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) 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.1713.5; Tue, 17 Nov 2020 19:47:53 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K0VU+MUM+LogqIDyeLMQ+y6q+GjBRwcNSyYnSxDaAbCUmZTPDPFBMjJHgWbAn0R3KJwxX2Iu4BhkqBwojHFvsEmTrb3woYkdAxsdcneJdDnGKvU81hsUBRxuSl0XT6HZG5gzh4NVN/8ONLXLi8sTg86IxEd1m5X5xiTv8rLJQUEq93T8KYRyjlWBSxagxZO7n9O/izpo+oH6+HCdVXPByfeMBGYLVUih2fdu/Zoo4S2Ehw5nDhGZBd4LjDAW1osxkKsqFG/3uuGzOppHa4enHv8vZ/QPSIcb+bH1B5pc3BrR1ACFikbQSIWFEUzV/fTFB1ZO6yEb5TwuUNz9YsZnMw== 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-SenderADCheck; bh=U/RwQbBQRLhE+OzdVIrkPHUS57Pg+h9BSQe7mWrcRm4=; b=Almdhr6Y7AIBT1Kq/dnxS6AzcrBQh4mmnFlFi7s7Vz84v42sm6gwLsdbkZDo5KhoJFMSZ9U3Oy/oc8HtHQx4O5m/t+yMIoY+ECuO0ftX4N1woZUnIwsU/Lhldxw/AALgjnhwM2Td0JNAAf1pvfpM6UoQrf/XvYRLhrfFD5ZJ0qDjG3SmP0rxKgtQSD//d4q9A25nRUyVlhkxVjgOaJ4cINvXw/hHu2SXpmi5WY6luEkPRB3MnQKDrGS1vLdP9KvSS3GCa6/3BkkM1Ky6+n+zmxbTtHGFj9u2aV+Bu/4C/6TdndX/JkPJSR76Fj22Zh9y1EjhmE7CrvpabUygkCIPeQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U/RwQbBQRLhE+OzdVIrkPHUS57Pg+h9BSQe7mWrcRm4=; b=cxUbq/AhdIHKxtALGcoxbWwCEVgGB27yOUIwOgeLcXWPfSV7JVXaXHX1CpzcBQ0TCuC5O9EXClSrUm5bCPIECKgGfBBbTCUsola/t4gMT84EGYe9i67Fi4LfRkhwZHI04COmszpf5NTUK/eBaBMp1unnOZf61VW1iML60Puhbxk= Received: from DM6PR11MB4058.namprd11.prod.outlook.com (2603:10b6:5:193::13) by DM6PR11MB2587.namprd11.prod.outlook.com (2603:10b6:5:c3::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.28; Wed, 18 Nov 2020 03:47:52 +0000 Received: from DM6PR11MB4058.namprd11.prod.outlook.com ([fe80::3558:3d27:c281:3f04]) by DM6PR11MB4058.namprd11.prod.outlook.com ([fe80::3558:3d27:c281:3f04%6]) with mapi id 15.20.3541.028; Wed, 18 Nov 2020 03:47:52 +0000 From: "Zeng, Star" To: "Feng, Bob C" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" , Yunhua Feng , "Liu, Zhiguang" , "Zeng, Star" Subject: Re: [edk2-devel] [Patch V2] IntelFsp2Pkg/Tools: Fixed PatchFv.py to parse new Fv map file format Thread-Topic: [edk2-devel] [Patch V2] IntelFsp2Pkg/Tools: Fixed PatchFv.py to parse new Fv map file format Thread-Index: AQHWu7+kteKbriiRWUGlNqPwyePLU6nNLBVAgAACrJCAABTd0A== Date: Wed, 18 Nov 2020 03:47:52 +0000 Message-ID: References: <20201116022422.1597-1-bob.c.feng@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.202] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 03658742-0c97-461d-9d3c-08d88b74b9da x-ms-traffictypediagnostic: DM6PR11MB2587: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1201; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gSvhIxcMEgoFIjq4Vqur66o9gX6C4V+Z+OVshaeD4BVXNFtATTLWqUogPpMRLd/kG8vuhHsg9gbDcxkLRv9QO9kLzTQb3eJdBv2rc0oVroCOfXukJ7QO9G2J0BJAge+CbP7EGSPlurWO2wQazn+Ud8Xy+2/tDh5GJWR72obQLsDEzxjAfGvzGsopdRMyU/4qXTUa8j0pimz2GFUEpa03wOUw93oHpIKyEyzXwNjRDcP0pg/baWOGrRuMM6SSC0QKuNo89eCbQgFWDo+bKOpc06Rc4bXenHySyZt1e6pRAW2Ynbk5nTQ8kZc6MFAksP8DLh+d/+CHVfk6L9gzEHFLBTt4mt7EczPH+PKVO75FqfO5O3bpxO9pRQ24PeO0v+WfA/xT3HZrBZDv7ct4TwSkPg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4058.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(136003)(346002)(39860400002)(376002)(76116006)(71200400001)(5660300002)(66446008)(66946007)(52536014)(186003)(316002)(19627235002)(8936002)(86362001)(33656002)(83380400001)(66556008)(66476007)(53546011)(6506007)(64756008)(966005)(4326008)(2906002)(9686003)(478600001)(54906003)(55016002)(26005)(107886003)(8676002)(110136005)(7696005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: lYOpUXhr+oOnqlz3lJL8eOGgaVnhCBjRF5vJJcC5uMfdSlpJkobBj+BiVp7i92daTstWSAyiEGmbOGKrY9x1XSmiAuD4zetItHI7vuyte6HUPblcniZANAv/G5zwww0OHYF5BA5pbLf64PilU5zVJ6t3biWdjlz7RUHbEt6glfn31DGPCVnYy29X+4qjJKP7z0DMhtcwjyUXokN7pV+HbMPhT9bkxI4G6HDBbducPFgLG/d6v0hjEX/lpR4GSY6P9C6v0gHNsBw0DlS/zgr1wHvYdi79uKo29TRSB1QgWu0T4HW5fpNMYGXix0o/RdD43aii0Hw4PlCPmEFNi1W3HXFw9IgUHtX74h96YaHlyA4iMbg5ccGYgyKOI/EzFRtqQOWa/jQvJytMB5jMfUz5IlbNa+LFpc9hjcPjLSxrsj+XJrS31JD3Uo6nVXTTn3WdTQ330fKAR5Lv8wSZBvTkokTw/BqXNCC1MSGIHcD8oqsvjh+oKhM8/Z7N1TDYJY5GfxLOqigZWGKmaTB47ZxvltfTf7PF+o8poBccqzXPCSgdSw5EWd2OaFIP8HoZPf1b0N5aEt6k7RpUW6JFQfwV072CN1pyniIFfo5yCSdD5qf3GBkvXtVjtH2Y3RrJNaVsDdw2v38DGgbST+CQ9E91lA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4058.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03658742-0c97-461d-9d3c-08d88b74b9da X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2020 03:47:52.2325 (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: TYcBROakwy9dZ71Ca0aLSAqomiGi9HWYDT/aB4Ch86JXX4lyaXg+WzYCyz8i6E7+rvaqqhl2sSGNnwsTNSx6pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2587 Return-Path: star.zeng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Oh, get the point. -----Original Message----- From: Feng, Bob C =20 Sent: Wednesday, November 18, 2020 10:41 AM To: Zeng, Star ; devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Yunhua Feng ; Liu, Zhigua= ng Subject: RE: [edk2-devel] [Patch V2] IntelFsp2Pkg/Tools: Fixed PatchFv.py t= o parse new Fv map file format Star,=20 Thanks for review. This patch try to match the new .map file format, if not= match, it will try to match the old format and then do the original logic.= I think it would be better not changing the original logic in this patch. Thanks, Bob -----Original Message----- From: Zeng, Star Sent: Wednesday, November 18, 2020 10:24 AM To: devel@edk2.groups.io; Feng, Bob C Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Yunhua Feng ; Liu, Zhigua= ng ; Zeng, Star Subject: RE: [edk2-devel] [Patch V2] IntelFsp2Pkg/Tools: Fixed PatchFv.py t= o parse new Fv map file format Reviewed-by: Star Zeng with a very minor comment inli= ne. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Bob=20 > Feng > Sent: Monday, November 16, 2020 10:24 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L=20 > ; Zeng, Star ;=20 > Yunhua Feng ; Liu, Zhiguang=20 > > Subject: [edk2-devel] [Patch V2] IntelFsp2Pkg/Tools: Fixed PatchFv.py=20 > to parse new Fv map file format >=20 > The commit 76e8aac158b0717fa27f12e4d008f79161ddb050 changed Fv map=20 > format. > It added the image type to better support source level debug. But it=20 > broke the function of PatchFv.py because PatchFv.py also consume Fv map f= ile. >=20 > This patch is to update PatchFv.py to make it work again. >=20 > Signed-off-by: Bob Feng > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Star Zeng > Cc: Yunhua Feng > Cc: Zhiguang Liu > --- >=20 > V2: Support both the old Fv map file format and new Fv map file format. >=20 >=20 > IntelFsp2Pkg/Tools/PatchFv.py | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/Tools/PatchFv.py=20 > b/IntelFsp2Pkg/Tools/PatchFv.py index 0c8d908063..112de4077a 100644 > --- a/IntelFsp2Pkg/Tools/PatchFv.py > +++ b/IntelFsp2Pkg/Tools/PatchFv.py > @@ -359,20 +359,23 @@ class Symbols: > rptLine =3D fdIn.readline() >=20 > modName =3D "" >=20 > foundModHdr =3D False >=20 > while (rptLine !=3D "" ): >=20 > if rptLine[0] !=3D ' ': >=20 > - #DxeIpl (Fixed Flash Address, BaseAddress=3D0x00fffb4310= , > EntryPoint=3D0x00fffb4958) >=20 > - #(GUID=3D86D70125-BAA3-4296-A62F- > 602BEBBB9081 .textbaseaddress=3D0x00fffb4398 .databaseaddress=3D0x00fffb4= 1 > 78) >=20 > - match =3D re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress= =3D(0x[0-9a-fA- > F]+),\s+EntryPoint=3D(0x[0-9a-fA-F]+)\)", rptLine) >=20 > + #DxeIpl (Fixed Flash Address,=20 > + BaseAddress=3D0x00fffb4310, > EntryPoint=3D0x00fffb4958,Type=3DPE) >=20 > + match =3D > + re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=3D(0x[0-9a- > fA-F]+),\s+EntryPoint=3D(0x[0-9a-fA-F]+),\s*Type=3D\w+\)", rptLine) >=20 > + if match is None: >=20 > + #DxeIpl (Fixed Flash Address,=20 > + BaseAddress=3D0x00fffb4310, > EntryPoint=3D0x00fffb4958) >=20 > + match =3D > + re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddress=3D(0x[0-9a- > fA-F]+),\s+EntryPoint=3D(0x[0-9a-fA-F]+)\)", rptLine) >=20 > if match is not None: Could here use 'else' ? Thanks, Star >=20 > foundModHdr =3D True >=20 > modName =3D match.group(1) >=20 > if len(modName) =3D=3D 36: >=20 > modName =3D > self.dictGuidNameXref[modName.upper()] >=20 > self.dictModBase['%s:BASE' % modName] =3D int=20 > (match.group(2), > 16) >=20 > self.dictModBase['%s:ENTRY' % modName] =3D int=20 > (match.group(3), > 16) >=20 > + #(GUID=3D86D70125-BAA3-4296-A62F- > 602BEBBB9081 .textbaseaddress=3D0x00fffb4398 .databaseaddress=3D0x00fffb4= 1 > 78) >=20 > match =3D re.match("\(GUID=3D([A-Z0-9\- > ]+)\s+\.textbaseaddress=3D(0x[0-9a-fA-F]+)\s+\.databaseaddress=3D(0x[0-9a= - > fA- > F]+)\)", rptLine) >=20 > if match is not None: >=20 > if foundModHdr: >=20 > foundModHdr =3D False >=20 > else: >=20 > -- > 2.29.1.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#67597):=20 > https://edk2.groups.io/g/devel/message/67597 > Mute This Topic: https://groups.io/mt/78284512/1779220 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [star.zeng@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D >=20