From cce9d763580a955d294a5e3696cbe07a03965e2b Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Wed, 16 Jan 2019 19:12:00 +0800 Subject: [PATCH] BaseTools: Allow empty value for HiiPcd in Dsc 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 Reviewed-by: Liming Gao --- 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 @@ -1525,8 +1525,6 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''): 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