From f2cc33d84949b711193aed145254f3b71dbfea57 Mon Sep 17 00:00:00 2001 From: zhijufan Date: Thu, 23 Aug 2018 12:40:37 +0800 Subject: BaseTools: Add check only VOID* type Pcd need the maxsize info Add check for the datum type keyword "VOID*", only the VOID* type Pcd need the additional maxsize info. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py') diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 7bfe0933a1..79e3180d5e 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1611,6 +1611,10 @@ class DscParser(MetaFileParser): ValList, Valid, Index = AnalyzeDscPcd(self._ValueList[2], self._ItemType) if not Valid: + if self._ItemType in (MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_FIXED_AT_BUILD, MODEL_PCD_PATCHABLE_IN_MODULE): + if ValList[1] != TAB_VOID and ValList[2]: + EdkLogger.error('build', FORMAT_INVALID, "Pcd format incorrect. Only VOID* type PCD need the maxsize info.", File=self._FileWithError, + Line=self._LineIndex + 1, ExtraData="%s.%s|%s" % (self._ValueList[0], self._ValueList[1], self._ValueList[2])) EdkLogger.error('build', FORMAT_INVALID, "Pcd format incorrect.", File=self._FileWithError, Line=self._LineIndex + 1, ExtraData="%s.%s|%s" % (self._ValueList[0], self._ValueList[1], self._ValueList[2])) PcdValue = ValList[Index] -- cgit v1.2.3