]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/Workspace: check MM module type compatibility with PI version.
authorSupreeth Venkatesh <supreeth.venkatesh@arm.com>
Mon, 26 Jun 2017 16:47:45 +0000 (00:47 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Fri, 7 Jul 2017 02:53:19 +0000 (10:53 +0800)
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 <jiewen.yao@intel.com>
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py

index c1af5c7fe32f1592244cb66c04e38bca16fd12ce..73b3fe7134472bc60b290f36682624a9006cbc48 100644 (file)
@@ -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):\r
                 if self._ModuleType == SUP_MODULE_SMM_CORE:\r
                     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)\r
+            if (self._Specification == None) or (not 'PI_SPECIFICATION_VERSION' in self._Specification) or (int(self._Specification['PI_SPECIFICATION_VERSION'], 16) < 0x00010032):\r
+                if self._ModuleType == SUP_MODULE_MM_CORE_STANDALONE:\r
+                    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)\r
+                if self._ModuleType == SUP_MODULE_MM_STANDALONE:\r
+                    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)\r
             if self._Defs and 'PCI_DEVICE_ID' in self._Defs and 'PCI_VENDOR_ID' in self._Defs \\r
                and 'PCI_CLASS_CODE' in self._Defs and 'PCI_REVISION' in self._Defs:\r
                 self._BuildType = 'UEFI_OPTIONROM'\r