From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 830BA211575F0 for ; Tue, 25 Sep 2018 20:13:54 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 20:13:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,304,1534834800"; d="scan'208";a="94838225" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 25 Sep 2018 20:13:53 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Sep 2018 20:13:53 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 25 Sep 2018 20:13:52 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.140]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.245]) with mapi id 14.03.0319.002; Wed, 26 Sep 2018 11:13:51 +0800 From: "Yao, Jiewen" To: "Chiu, Chasel" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD Thread-Index: AQHUVUXJunoLveTKvk2jxCMkSQzfsaUB4yiw Date: Wed, 26 Sep 2018 03:13:50 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AD9949F@shsmsx102.ccr.corp.intel.com> References: <20180926030503.112-1-chasel.chiu@intel.com> In-Reply-To: <20180926030503.112-1-chasel.chiu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTZmNzRjY2QtY2VjYy00YmZhLTk5MmMtMmIxOGNhZjNiNTFiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWXZjUUc1STU0NFJcL0piSWx4bld3UjlyTUp5SGhRT1FyclwvQWh5R1A2TEJxYmtpdGx6V2VcL0RWV0N5cHlDbW1vaiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 03:13:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Chasel Would you please add the unit test information? Also, please file a Bugzilla for that. Thank you Yao Jiewen > -----Original Message----- > From: Chiu, Chasel > Sent: Wednesday, September 26, 2018 11:05 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Gao, Liming > ; Zhu, Yonghong ; Chiu, > Chasel > Subject: [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD >=20 > FixedAtBuild PCD is suggested to be used instead > of FeatureFlag PCD so extend this tool to support. > Also skipped PCDs which commented out by '#'. >=20 > Cc: Jiewen Yao > Cc: Gao Liming > Cc: Zhu Yonghong > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Chasel Chiu > --- > 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 c9b7bc5373..32cf63ff03 100644 > --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py > +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py > @@ -1,6 +1,6 @@ > ## @ GenCfgOpt.py > # > -# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
> +# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
> # This program and the accompanying materials are licensed and made > available under > # the terms and conditions of the BSD License that accompanies this > distribution. > # The full text of the license may be found at > @@ -449,7 +449,7 @@ EndList > IsUpdSect =3D False > if Match.group(1).lower() =3D=3D "Defines".lower(): > IsDefSect =3D True > - if Match.group(1).lower() =3D=3D > "PcdsFeatureFlag".lower(): > + if (Match.group(1).lower() =3D=3D > "PcdsFeatureFlag".lower() or Match.group(1).lower() =3D=3D > "PcdsFixedAtBuild".lower()): > IsPcdSect =3D True > elif Match.group(1).lower() =3D=3D > "PcdsDynamicVpd.Upd".lower(): > ConfigDict =3D {} > @@ -491,7 +491,7 @@ EndList > IfStack.append(Result) > ElifStack.append(0) > else: > - Match =3D re.match("!(if|elseif)\s+(.+)", > DscLine) > + Match =3D re.match("!(if|elseif)\s+(.+)", > DscLine.split("#")[0]) > if Match: > Result =3D > self.EvaluateExpress(Match.group(2)) > if Match.group(1) =3D=3D "if": > -- > 2.13.3.windows.1