From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.4476.1605275842027945434 for ; Fri, 13 Nov 2020 05:57:22 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: bob.c.feng@intel.com) IronPort-SDR: vDmQPfwkWBlbUUi6/5xQI8iJJ7/VxnI+bEaOu003kJ3yUZxYyZbVVx98NCJglJGTi5XD6wbHtz xAQ15JyLyJgg== X-IronPort-AV: E=McAfee;i="6000,8403,9803"; a="232090314" X-IronPort-AV: E=Sophos;i="5.77,475,1596524400"; d="scan'208";a="232090314" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2020 05:57:20 -0800 IronPort-SDR: p1PU8TH8Vkprfrj8i4mWOiR7lvD2df1RdcX/saSPGhZNMMicfQ/WE+SskDvqXRbI5+9BzRkr3a qBB4i3qJzAkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,475,1596524400"; d="scan'208";a="328880299" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.32]) by orsmga006.jf.intel.com with ESMTP; 13 Nov 2020 05:57:18 -0800 From: "Bob Feng" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Star Zeng , Yunhua Feng , Zhiguang Liu Subject: [Patch] IntelFsp2Pkg/Tools: Fixed PatchFv.py to parse new Fv map file format Date: Fri, 13 Nov 2020 21:57:16 +0800 Message-Id: <20201113135716.159-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.29.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The commit 76e8aac158b0717fa27f12e4d008f79161ddb050 changed Fv map format. It added the image type to better support source level debug. But it broke the function of PatchFv.py because PatchFv.py also consume Fv map file. This patch is to update PatchFv.py to make it work again. Signed-off-by: Bob Feng Cc: Chasel Chiu Cc: Nate DeSimone Cc: Star Zeng Cc: Yunhua Feng Cc: Zhiguang Liu --- IntelFsp2Pkg/Tools/PatchFv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py index 0c8d908063..f4c390a17b 100644 --- a/IntelFsp2Pkg/Tools/PatchFv.py +++ b/IntelFsp2Pkg/Tools/PatchFv.py @@ -361,11 +361,11 @@ class Symbols: foundModHdr =3D False=0D while (rptLine !=3D "" ):=0D if rptLine[0] !=3D ' ':=0D #DxeIpl (Fixed Flash Address, BaseAddress=3D0x00fffb4310, = EntryPoint=3D0x00fffb4958)=0D #(GUID=3D86D70125-BAA3-4296-A62F-602BEBBB9081 .textbaseadd= ress=3D0x00fffb4398 .databaseaddress=3D0x00fffb4178)=0D - 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)=0D + 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)= =0D if match is not None:=0D foundModHdr =3D True=0D modName =3D match.group(1)=0D if len(modName) =3D=3D 36:=0D modName =3D self.dictGuidNameXref[modName.upper()]= =0D --=20 2.29.1.windows.1