]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Allow empty value for HiiPcd in Dsc
authorFeng, Bob C <bob.c.feng@intel.com>
Wed, 16 Jan 2019 11:12:00 +0000 (19:12 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Fri, 18 Jan 2019 02:20:01 +0000 (10:20 +0800)
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 <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Common/Misc.py

index 76a73d1c33db1a1ae66b1821f97abf740bac4a4b..feb2c7e394e1aaf7d717da1116b31340e86b4980 100644 (file)
@@ -1525,8 +1525,6 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''):
             Offset = FieldList[2]\r
         if len(FieldList) > 3:\r
             Value = FieldList[3]\r
-            if not Value:\r
-                IsValid = False\r
         if len(FieldList) > 4:\r
             Attribute = FieldList[4]\r
         return [HiiString, Guid, Offset, Value, Attribute], IsValid, 3\r