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>
This commit is contained in:
Zhaozh1x
2018-08-27 09:29:37 +08:00
committed by Liming Gao
parent b8bcaafb39
commit 24bd035c90
2 changed files with 6 additions and 4 deletions

View File

@ -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