From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: chasel.chiu@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Thu, 01 Aug 2019 02:16:51 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 02:16:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,333,1559545200"; d="scan'208";a="175188710" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by orsmga003.jf.intel.com with ESMTP; 01 Aug 2019 02:16:50 -0700 Received: from pgsmsx110.gar.corp.intel.com (10.221.44.111) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 1 Aug 2019 17:11:12 +0800 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.22]) by PGSMSX110.gar.corp.intel.com ([169.254.13.19]) with mapi id 14.03.0439.000; Thu, 1 Aug 2019 17:11:11 +0800 From: "Chiu, Chasel" To: "Cheng, Ching JenX" , "devel@edk2.groups.io" CC: "Chan, Amy" , "Desimone, Nathaniel L" , "Zeng, Star" Subject: Re: [PATCH] * IntelFsp2Pkg: Improve FSP Python scripts to support 3.x. Thread-Topic: [PATCH] * IntelFsp2Pkg: Improve FSP Python scripts to support 3.x. Thread-Index: AdVINwYctnADMCfmS3ay22g2Z+P6BwAD/11w Date: Thu, 1 Aug 2019 09:11:11 +0000 Message-ID: <3C3EFB470A303B4AB093197B6777CCEC504510A1@PGSMSX111.gar.corp.intel.com> References: <41C441B9D06FFF49AD23ED447CFBE8B15F3414@BGSMSX105.gar.corp.intel.com> In-Reply-To: <41C441B9D06FFF49AD23ED447CFBE8B15F3414@BGSMSX105.gar.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTI4ZjU0MWEtMzI0ZC00MmNmLTljZTItODE1ZDk5YTBiOWNiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMHVRcjVrR1wvSG13c3VkOHhweFJ1QzBTcHgwT1QrWTBZRlE0RkR2cFllWk40bUkyMFVvdGpLN3lUd3IycTVvSFcifQ== x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.205] MIME-Version: 1.0 Return-Path: chasel.chiu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please help to update the commit message to explain a little more about wha= t you are fixing. Thanks! Chasel > -----Original Message----- > From: Cheng, Ching JenX > Sent: Thursday, August 1, 2019 3:02 PM > To: devel@edk2.groups.io > Cc: Chan, Amy ; Chiu, Chasel ; > Desimone, Nathaniel L ; Zeng, Star > > Subject: [PATCH] * IntelFsp2Pkg: Improve FSP Python scripts to support 3.= x. >=20 > BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2041 >=20 > Improve Python3.x support with IntelFsp2Pkg/Tools/GenCfgOpt.py, Base on <= <, > print('%x' % ) is only support for int, not float. >=20 > Cc: Amy Chan > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Star Zeng > Signed-off-by: Ching JenX Cheng > --- > IntelFsp2Pkg/Tools/GenCfgOpt.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py > b/IntelFsp2Pkg/Tools/GenCfgOpt.py index a42717caae..2fa7582d85 100644 > --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py > +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py > @@ -715,7 +715,7 @@ EndList > if (ConfigDict['embed'].find(':END') !=3D -1): > Remainder =3D Offset % (MaxAlign/8) # MaxA= lign is either > 32 or 64 > if Remainder: > - Diff =3D (MaxAlign/8) - Remainder > + Diff =3D int((MaxAlign/8) - Remainder) > Offset =3D Offset + Diff > ItemOffset =3D ItemOffset + Diff > MaxAlign =3D 32 # Rese= t to default 32 > align when struct end > @@ -727,7 +727,7 @@ EndList > Remainder =3D Offset % max(ItemLength/8, 4, = SizeAlign) > Offset =3D Offset + ItemLength > if Remainder: > - Diff =3D max(ItemLength/8, 4, SizeAlign)= - Remainder > + Diff =3D int(max(ItemLength/8, 4, > + SizeAlign) - Remainder) > ItemOffset =3D ItemOffset + Diff > ConfigDict['offset'] =3D ItemOffset >=20 > @@ -1416,7 +1416,7 @@ EndList > if BitsRemain: > BsfFd.write(" Skip %d bits\n" % BitsR= emain) > BitsGap -=3D BitsRemain > - BytesRemain =3D BitsGap / 8 > + BytesRemain =3D int(BitsGap / 8) > if BytesRemain: > BsfFd.write(" Skip %d bytes\n" % Byte= sRemain) > NextOffset =3D Item['offset'] + Item['length'] > -- > 2.21.0.windows.1