From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 7234921959CB2 for ; Mon, 26 Jun 2017 09:47:16 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 01F0215AD; Mon, 26 Jun 2017 09:48:46 -0700 (PDT) Received: from u201365.usa.Arm.com (bc-c3-3-14.eu.iaas.arm.com [10.6.43.238]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B19C3F4FF; Mon, 26 Jun 2017 09:48:44 -0700 (PDT) From: Supreeth Venkatesh To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, michael.d.kinney@intel.com, liming.gao@intel.com, achin.gupta@arm.com, supreeth.venkatesh@arm.com, felixp@ami.com, jbrasen@qti.qualcomm.com, jonathan.zhang@cavium.com, Jiewen Yao Date: Mon, 26 Jun 2017 17:47:45 +0100 Message-Id: <1498495666-32452-10-git-send-email-supreeth.venkatesh@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498495666-32452-1-git-send-email-supreeth.venkatesh@arm.com> References: <1498495666-32452-1-git-send-email-supreeth.venkatesh@arm.com> Subject: [PATCH v5 09/10] BaseTools/Workspace: check MM module type compatibility with PI version. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 16:47:16 -0000 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 --- BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index c1af5c7..73b3fe7 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' -- 2.7.4