From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 0CCFF2194D3AE for ; Thu, 17 Jan 2019 06:10:03 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2019 06:10:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,489,1539673200"; d="scan'208";a="135461503" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 17 Jan 2019 06:10:02 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 17 Jan 2019 06:10:02 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 17 Jan 2019 06:10:02 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.44]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.160]) with mapi id 14.03.0415.000; Thu, 17 Jan 2019 22:09:58 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" Thread-Topic: [Patch] BaseTools: Allow empty value for HiiPcd in Dsc Thread-Index: AQHUrbeWvU0E6DnWlE+R9hUElY3pXqWzgTOA Date: Thu, 17 Jan 2019 14:09:58 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B3E9E@SHSMSX152.ccr.corp.intel.com> References: <20190116162142.11216-1-bob.c.feng@intel.com> In-Reply-To: <20190116162142.11216-1-bob.c.feng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTQxY2ZhYmQtMDEzNC00NjFkLThhNTMtYWFlZTljYTMzZTc1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNHRmMWNaN2Z1UFVNTFJEc0VuR3pJUTlZTm9UN0NaMVlwXC9IXC90UlprTU5LM3lCd2NJcWFvdU53NDBKdXQ3bEJBIn0= 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] BaseTools: Allow empty value for HiiPcd in Dsc 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: Thu, 17 Jan 2019 14:10:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Feng, Bob C > Sent: Thursday, January 17, 2019 12:22 AM > To: edk2-devel@lists.01.org > Cc: Feng, Bob C ; Gao, Liming ; Carsey, Jaben > Subject: [Patch] BaseTools: Allow empty value for HiiPcd in Dsc >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1466 >=20 > DEC file defines PCD default value and PCD supported type. > DSC can configure PCD type and value. > If the value is same to default value in DEC file, > DSC can only configure PCD type and leave empty for value. > This usage supports all type PCD except for DynamicHii type. > So, DynamicHii PCD should support this usage. Below is one example in DSC= . >=20 > for example, > [PcdsDynamicHii.common.DEFAULT] > PcdPkgTokenSpaceGuid.PcdCName|L"VarName"|gVarGuid|0x00||NV,BS >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Bob Feng > Cc: Liming Gao > Cc: Jaben Carsey > --- > BaseTools/Source/Python/Common/Misc.py | 2 -- > 1 file changed, 2 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Py= thon/Common/Misc.py > index 76a73d1c33..feb2c7e394 100644 > --- a/BaseTools/Source/Python/Common/Misc.py > +++ b/BaseTools/Source/Python/Common/Misc.py > @@ -1523,12 +1523,10 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=3D''= ): > Guid =3D FieldList[1] > if len(FieldList) > 2: > Offset =3D FieldList[2] > if len(FieldList) > 3: > Value =3D FieldList[3] > - if not Value: > - IsValid =3D False > if len(FieldList) > 4: > Attribute =3D FieldList[4] > return [HiiString, Guid, Offset, Value, Attribute], IsValid, 3 > return [], False, 0 >=20 > -- > 2.19.1.windows.1