diff options
author | Zhaozh1x <zhiqiangx.zhao@intel.com> | 2018-08-27 09:29:37 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-09-03 10:14:44 +0800 |
commit | 24bd035c904fae1868bb15dc00cfa2e197cc5809 (patch) | |
tree | 313a7211e390215eb922f12d7776d742d50338b4 /BaseTools/Source/Python/Common | |
parent | b8bcaafb39e8860a1fb672d75bb6f7bbdceb28bd (diff) | |
download | edk2-24bd035c904fae1868bb15dc00cfa2e197cc5809.tar.gz edk2-24bd035c904fae1868bb15dc00cfa2e197cc5809.tar.bz2 edk2-24bd035c904fae1868bb15dc00cfa2e197cc5809.zip |
BaseTools: Check pcd DefaultValue and SkuId EBNF.
1. When assign dynamic hii pcd value in dsc file,
missed the DefaultValue, build should be fail.
2. Check the EBNF of SkuId.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r-- | BaseTools/Source/Python/Common/Misc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 5a63c83a2a..2cf9574326 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -1508,6 +1508,7 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''): Size = -1
return [VpdOffset, str(Size), Value], IsValid, 2
elif PcdType in (MODEL_PCD_DYNAMIC_HII, MODEL_PCD_DYNAMIC_EX_HII):
+ IsValid = (3 <= len(FieldList) <= 5)
HiiString = FieldList[0]
Guid = Offset = Value = Attribute = ''
if len(FieldList) > 1:
@@ -1516,9 +1517,10 @@ 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]
- IsValid = (3 <= len(FieldList) <= 5)
return [HiiString, Guid, Offset, Value, Attribute], IsValid, 3
return [], False, 0
|