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.43; helo=mga05.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 28AC821A07A80 for ; Wed, 26 Sep 2018 00:24:48 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 00:24:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,305,1534834800"; d="scan'208";a="93806136" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 26 Sep 2018 00:24:11 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Sep 2018 00:24:11 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Sep 2018 00:24:10 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.140]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.183]) with mapi id 14.03.0319.002; Wed, 26 Sep 2018 15:23:59 +0800 From: "Yao, Jiewen" To: "Chiu, Chasel" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [edk2] [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD Thread-Index: AQHUVVlJG2PKOrCTn0aEbLfgaDC22qUCKQoQ Date: Wed, 26 Sep 2018 07:23:58 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AD9C525@shsmsx102.ccr.corp.intel.com> References: <20180926052449.12076-1-chasel.chiu@intel.com> In-Reply-To: <20180926052449.12076-1-chasel.chiu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDBiOGY1NDUtYTUzZC00ZWVhLTg0MjgtZjQ4OGY4YWQ2MDhjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZUJOZkdVeEZTNDg1TmZuWCs3eDRUVWhDdHp4cDlaM0s2amM1enJuNHRRSGxCSW4zaVBxMHU0RkVlWko4V3NKeCJ9 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 07:24:49 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Chasel, Chiu > Sent: Wednesday, September 26, 2018 1:25 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Gao, Liming > > Subject: [edk2] [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild > PCD >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1210 >=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 > Test: Verified with FixedAtBuild PCD for including or > excluding lines in generated UPD header files successfully. >=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 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel