From: Supreeth Venkatesh Date: Mon, 26 Jun 2017 16:47:45 +0000 (+0800) Subject: BaseTools/Workspace: check MM module type compatibility with PI version. X-Git-Tag: edk2-stable201903~3833 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=aeb88bf3d130802e94387403e29d5cb2e288dc54 BaseTools/Workspace: check MM module type compatibility with PI version. This patch checks SUP_MODULE_MM_CORE_STANDALONE and SUP_MODULE_MM_STANDALONE module compatibility with PI specification version. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao Signed-off-by: Supreeth Venkatesh Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index c1af5c7fe3..73b3fe7134 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py @@ -1977,6 +1977,11 @@ class InfBuildData(ModuleBuildClassObject): if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (int(self._Specification['PI_SPECIFICATION_VERSION'], 16) < 0x0001000A): if self._ModuleType == SUP_MODULE_SMM_CORE: EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.MetaFile) + if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (int(self._Specification['PI_SPECIFICATION_VERSION'], 16) < 0x00010032): + if self._ModuleType == SUP_MODULE_MM_CORE_STANDALONE: + EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "MM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.MetaFile) + if self._ModuleType == SUP_MODULE_MM_STANDALONE: + EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "MM_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.MetaFile) if self._Defs and 'PCI_DEVICE_ID' in self._Defs and 'PCI_VENDOR_ID' in self._Defs \ and 'PCI_CLASS_CODE' in self._Defs and 'PCI_REVISION' in self._Defs: self._BuildType = 'UEFI_OPTIONROM'