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.93; helo=mga11.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 25F37211B5A25 for ; Wed, 16 Jan 2019 08:21:55 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2019 08:21:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,486,1539673200"; d="scan'208";a="267605278" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga004.jf.intel.com with ESMTP; 16 Jan 2019 08:21:45 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao , Jaben Carsey Date: Thu, 17 Jan 2019 00:21:42 +0800 Message-Id: <20190116162142.11216-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Subject: [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: Wed, 16 Jan 2019 16:21:55 -0000 Content-Transfer-Encoding: 8bit https://bugzilla.tianocore.org/show_bug.cgi?id=1466 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. for example, [PcdsDynamicHii.common.DEFAULT] PcdPkgTokenSpaceGuid.PcdCName|L"VarName"|gVarGuid|0x00||NV,BS 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(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/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=''): Guid = FieldList[1] if len(FieldList) > 2: Offset = FieldList[2] if len(FieldList) > 3: Value = FieldList[3] - if not Value: - IsValid = False if len(FieldList) > 4: Attribute = FieldList[4] return [HiiString, Guid, Offset, Value, Attribute], IsValid, 3 return [], False, 0 -- 2.19.1.windows.1