From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AE7A781ED8 for ; Thu, 24 Nov 2016 18:16:07 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 24 Nov 2016 18:16:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,692,1473145200"; d="scan'208";a="9109587" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 24 Nov 2016 18:16:07 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 24 Nov 2016 18:16:07 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 24 Nov 2016 18:16:06 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.142]) with mapi id 14.03.0248.002; Fri, 25 Nov 2016 10:16:04 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fix bug for decimal value of VPDPCD offset display in report Thread-Index: AQHSRmabglNm58yF80qh+xrt/ngiLKDo9ulA Date: Fri, 25 Nov 2016 02:16:04 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B4B92E5@shsmsx102.ccr.corp.intel.com> References: <1480000956-21424-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1480000956-21424-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix bug for decimal value of VPDPCD offset display in report X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 02:16:07 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Zhu, Yonghong > Sent: Thursday, November 24, 2016 11:23 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [Patch] BaseTools: Fix bug for decimal value of VPDPCD offset > display in report >=20 > current if we set VPD PCD's offset to a decimal value, eg: 22, this > value is displayed incorrectly in the "FD VPD Region" section in the > report.txt. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/build/BuildReport.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/build/BuildReport.py > b/BaseTools/Source/Python/build/BuildReport.py > index 4c57754..fb28970 100644 > --- a/BaseTools/Source/Python/build/BuildReport.py > +++ b/BaseTools/Source/Python/build/BuildReport.py > @@ -1558,11 +1558,14 @@ class FdReport(object): > if len(Line) =3D=3D 0 or Line.startswith("#"): > continue > try: > PcdName, SkuId, Offset, Size, Value =3D Line.split("= #")[0].split("|") > PcdName, SkuId, Offset, Size, Value =3D PcdName.stri= p(), > SkuId.strip(), Offset.strip(), Size.strip(), Value.strip() > - Offset =3D '0x%08X' % (int(Offset, 16) + self.VPDBas= eAddress) > + if Offset.lower().startswith('0x'): > + Offset =3D '0x%08X' % (int(Offset, 16) + self.VP= DBaseAddress) > + else: > + Offset =3D '0x%08X' % (int(Offset, 10) + self.VP= DBaseAddress) > self.VPDInfoList.append("%s | %s | %s | %s | %s" % (= PcdName, > SkuId, Offset, Size, Value)) > except: > EdkLogger.error("BuildReport", CODE_ERROR, "Fail to = parse VPD > information file %s" % self.VpdFilePath) > fd.close() >=20 > -- > 2.6.1.windows.1