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.web11.18906.1605666276702535874 for ; Tue, 17 Nov 2020 18:24:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=WkJc6Yhg; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: star.zeng@intel.com) IronPort-SDR: ssBWq6yG8Z1D6sWR5931Uz/JRZdOU02CSVru3BpEypjNWP9VHjRHTAudzbp9MCL8s9GbLBm5a+ x1U3Rjdsrqpg== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="158826681" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="158826681" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 18:24:35 -0800 IronPort-SDR: AXISXD91hgjgaacJWZuRnDiKWTl5hBWdsGPYIO20xGF/PG5bnVA2c/LYyUnZcOQMNnDn1VE55k xZzHx5axBRuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="368098819" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by FMSMGA003.fm.intel.com with ESMTP; 17 Nov 2020 18:24:35 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) 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.1713.5; Tue, 17 Nov 2020 18:24:35 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) 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 18:24:34 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) 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 18:24:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kEVo5p5K67QlV3adHlT1oqTVwvcXQxNo2yLQHZciiulUuMCBBBqhVV/cOfs9yidgFoVaIjmmwwwukOsE3y5muCZSxOuffN+MxKfGxBzFS3zIJSAHTzcY5cKRIlTlQSSETu/258Pgqr/T0yE+iyZLgUnEOtem3hb7/XBL3qu+i1okAekprcfpnvH6opZgkSdBIGrQ/nbxCTs85U+RXKF+N2ppaaSnRBHObzNI4BzRNxdB15ANQfOeDA/y5G/4LZoTwhPHOd4818lY0FgKzffVqj2YQkUCs4C5FUyDwl4/FczjQ9ll23lF/noNfnWYgcOqr+g1FRLwzZVJI1KP1hhOGg== 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=WnwJBj4e2auINMuKrnna+FXn1rugie+TAYUAQwHlnAM=; b=j4Y1tvV0jHn/oT1daM24KwwePPbPkO5hHRNyL2DMxYjKJJLT5rTkC/KwJZk3FTORJ+OQoSN9uVlVOnEfWCfwULztkjmCYBgqrjvj92/JxckMJgceehwDKJyuMQ+5IEMnuTpp3AVFnvf5+VV4S9+CsNhJYq5v/KpU6UWXqW4q7or3/ZdXzV+t8EZbIxCugPpmjNIN27XVkYIkOUF+NenGz45Ezmgy0LqbJ8vKxddofd74FPKYB7fHJnU6tQiJ0ulXBUK0fJnDrWCo/gUg5VjYkDUxAbR4pfuJQLdCRomExn7Q+iwf7gLQwukyY6iTB11jkOwprMgpPqxPSmjJEr+DwA== 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=WnwJBj4e2auINMuKrnna+FXn1rugie+TAYUAQwHlnAM=; b=WkJc6YhgUe2+ofmQvmOvS0edsQbLzC7S9APsxCQcR0LRRfFdCh7swKO52f4maP63cnaiGVgPI/swKEce9CuBElsNJ4NqQXJU0WwVGjF0zspkdG4H8SxvlAG5ckhH/VYnDm6aMaN20CyLRaVhJkSwzt1HIISnpSvbkHQxZtz920U= Received: from DM6PR11MB4058.namprd11.prod.outlook.com (2603:10b6:5:193::13) by DM5PR11MB1739.namprd11.prod.outlook.com (2603:10b6:3:111::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.25; Wed, 18 Nov 2020 02:24:27 +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 02:24:27 +0000 From: "Zeng, Star" To: "devel@edk2.groups.io" , "Feng, Bob C" 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+kteKbriiRWUGlNqPwyePLU6nNLBVA Date: Wed, 18 Nov 2020 02:24:26 +0000 Message-ID: References: <20201116022422.1597-1-bob.c.feng@intel.com> In-Reply-To: <20201116022422.1597-1-bob.c.feng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.206] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9f361407-4c23-4f56-53ea-08d88b69127b x-ms-traffictypediagnostic: DM5PR11MB1739: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:51; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mcaOz7G//auEDR1hWuLdQNpHeDjLXF02HOxPJJZTbwgQXgb67urbI6tINpJioGd0xCrFLYnsu9dnC+52/QgYGgEXZHxaReyEZltFOne7PaHfTmUxh7IXilRHimMgk8UwAM1/fswbX0AQVeoBE8yEWXcooDk/dRw2gA53t/C9HC03mjU7NKCCRadho0bYaUlsGaT18SopwsK5N0bSJ/NHCOQnW2qnS4Crk9gycnuY4c98Q0+Zwll4i2vu21eG4w1c4+m6BbcG0WzDR90CuxWx827AXSC53StueeoTtQcVGEkJneCFSCsQEAQsLk8M7kvIGkuPWiF1T++VVx7uwnHySKROw5bVhoQbaQOEihHJ4r4ZRt7AiVlQtIGJcx0kirsAiJhPSLxvBBOJvoaDdhY10g== 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)(136003)(396003)(346002)(39860400002)(376002)(366004)(66556008)(19627235002)(33656002)(4326008)(110136005)(2906002)(316002)(7696005)(64756008)(66946007)(107886003)(5660300002)(54906003)(52536014)(8936002)(6506007)(76116006)(53546011)(66446008)(66476007)(71200400001)(8676002)(86362001)(55016002)(83380400001)(6636002)(966005)(9686003)(186003)(26005)(478600001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: su3yoP53OPKIzACm+m8l3lRJmFi7tMOg69oFf1oChBW7gfZCWawZsMRzd1kKU9o5AAO+aC6/+AQqgAh6rvdF53jJIO5/OGO9nsQSROT1v6f7LEXKhlA/HsGGd/y1hYFiyFNZ/3zyfDumjOXL2xh6YUCCnfSTv6N6xh5p0xoud+RohcGUcoyiAQHz1tyUo9OHybq0c7HehqZAx2SzTXNVKp/J9889ZpRoC+MeW4yceC6rumLrmGXneZE+pLosQXnJi+054JQ3c3VzUSqw29AUi8kL/8CePIPyctlE7TgdrEgwWN5StZjXnVB2VA1ViIXKSwDdde4Rxw8h3lJkDZKZAN5eqM/KjUVzJ1hbfDU3MGbKwaHOGDfjI3GEc8ByCl0ubqAof2Ntnjt+w/XIib4h2R6DUYRK/3gmbn46oKLeDa6CU9/sOns84CS/pgsUgTw5J8P0mXqot95l1RS2efHu8GXgPg4EkXWfJmvuFq0+1CKvVBzFbzqaAKtgjsxB2CotvL4tO4spLd5QfFj14NSAu7Wy6VfXdScm9v2FBScN+ONRJYM2801+FBScvLgSZpaERD+QaasY3Q6uTOjGaT1FHDxc3ra9gexFt9hNg75O91u4k18dPopizepfMdiLfSMJrJXYuiQ7i+aVjre6rGrfuw== 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: 9f361407-4c23-4f56-53ea-08d88b69127b X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2020 02:24:26.9575 (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: OVV0iNmm/HgvmZhTzSAiE3aPhr7t0mZhALe4e+EuCTSrrUnYEn68FptEOFd9Y7PtN2dkbW/JOcSp5gLiXu4qHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1739 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 Reviewed-by: Star Zeng with a very minor comment inli= ne. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Bob > Feng > Sent: Monday, November 16, 2020 10:24 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Zeng, Star ; > Yunhua Feng ; Liu, Zhiguang > > Subject: [edk2-devel] [Patch V2] IntelFsp2Pkg/Tools: Fixed PatchFv.py to > parse new Fv map file format >=20 > The commit 76e8aac158b0717fa27f12e4d008f79161ddb050 changed Fv map > format. > It added the image type to better support source level debug. But it brok= e > the function of PatchFv.py because PatchFv.py also consume Fv map file. >=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 b/IntelFsp2Pkg/Tools/PatchFv.p= y > 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, 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, BaseAddress=3D0x00fffb= 4310, > EntryPoint=3D0x00fffb4958) >=20 > + match =3D re.match("([_a-zA-Z0-9\-]+)\s\(.+BaseAddre= ss=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 (matc= h.group(2), > 16) >=20 > self.dictModBase['%s:ENTRY' % modName] =3D int (matc= h.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): 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