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 38A3121945DD1 for ; Mon, 5 Jun 2017 14:43:56 -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 603FE344; Mon, 5 Jun 2017 14:45:02 -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 499193F25D; Mon, 5 Jun 2017 14:45:01 -0700 (PDT) From: Supreeth Venkatesh To: edk2-devel@lists.01.org Cc: leif.lindholm@arm.com, ard.biesheuvel@linaro.org, achin.gupta@arm.com, supreeth.venkatesh@arm.com, Jiewen Yao Date: Mon, 5 Jun 2017 22:43:51 +0100 Message-Id: <1496699034-4186-8-git-send-email-supreeth.venkatesh@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496699034-4186-1-git-send-email-supreeth.venkatesh@arm.com> References: <1496699034-4186-1-git-send-email-supreeth.venkatesh@arm.com> Subject: [PATCH 07/10] BaseTools: Tools change to support PI v1.5 Specification. 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, 05 Jun 2017 21:43:56 -0000 This patch verifies SMM_CORE_STANDALONE module compatibility with PI specification version. Also, it registers SMM_STANDALONE/SMM_CORE_STANDALONE modules with FdfParser class and provides mapping between SMM_STANDALONE and SMM_CORE_STANDALONE module type in FDF with EFI_FV_FILETYPE_SMM_STANDALONE and EFI_FV_FILETYPE_SMM_CORE file types in GenFfs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao Signed-off-by: Supreeth Venkatesh --- BaseTools/Source/Python/GenFds/FdfParser.py | 4 ++-- BaseTools/Source/Python/GenFds/Ffs.py | 7 +++++-- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index a1825ba..a291c03 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -3672,7 +3672,7 @@ class FdfParser: "DXE_SMM_DRIVER", "DXE_RUNTIME_DRIVER", \ "UEFI_DRIVER", "UEFI_APPLICATION", "USER_DEFINED", "DEFAULT", "BASE", \ "SECURITY_CORE", "COMBINED_PEIM_DRIVER", "PIC_PEIM", "RELOCATABLE_PEIM", \ - "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE"): + "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE", "SMM_STANDALONE", "SMM_CORE_STANDALONE"): raise Warning("Unknown Module type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber) return self.__Token @@ -3716,7 +3716,7 @@ class FdfParser: Type = self.__Token.strip().upper() if Type not in ("RAW", "FREEFORM", "SEC", "PEI_CORE", "PEIM",\ - "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE"): + "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLICATION", "FV_IMAGE", "SMM", "SMM_CORE", "SMM_STANDALONE"): raise Warning("Unknown FV type '%s'" % self.__Token, self.FileName, self.CurrentLineNumber) if not self.__IsToken("="): diff --git a/BaseTools/Source/Python/GenFds/Ffs.py b/BaseTools/Source/Python/GenFds/Ffs.py index c8c5a6e..3a44f1c 100644 --- a/BaseTools/Source/Python/GenFds/Ffs.py +++ b/BaseTools/Source/Python/GenFds/Ffs.py @@ -34,7 +34,9 @@ class Ffs(FDClassObject): 'DXE_RUNTIME_DRIVER': 'EFI_FV_FILETYPE_DRIVER', 'UEFI_DRIVER' : 'EFI_FV_FILETYPE_DRIVER', 'UEFI_APPLICATION' : 'EFI_FV_FILETYPE_APPLICATION', - 'SMM_CORE' : 'EFI_FV_FILETYPE_SMM_CORE' + 'SMM_CORE' : 'EFI_FV_FILETYPE_SMM_CORE', + 'SMM_STANDALONE' : 'EFI_FV_FILETYPE_SMM_STANDALONE', + 'SMM_CORE_STANDALONE' : 'EFI_FV_FILETYPE_SMM_CORE', } # mapping between FILE type in FDF and file type for GenFfs @@ -50,7 +52,8 @@ class Ffs(FDClassObject): 'RAW' : 'EFI_FV_FILETYPE_RAW', 'PEI_DXE_COMBO' : 'EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER', 'SMM' : 'EFI_FV_FILETYPE_SMM', - 'SMM_CORE' : 'EFI_FV_FILETYPE_SMM_CORE' + 'SMM_CORE' : 'EFI_FV_FILETYPE_SMM_CORE', + 'SMM_STANDALONE' : 'EFI_FV_FILETYPE_SMM_STANDALONE', } # mapping between section type in FDF and file suffix diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py index e9517a4..38701bb 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -224,6 +224,9 @@ class FfsInfStatement(FfsInfStatementClassObject): if self.ModuleType == 'SMM_CORE' and int(self.PiSpecVersion, 16) < 0x0001000A: EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName) + if self.ModuleType == 'SMM_CORE_STANDALONE' and int(self.PiSpecVersion, 16) < 0x0001000A: + EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName) + if Inf._Defs != None and len(Inf._Defs) > 0: self.OptRomDefs.update(Inf._Defs) -- 2.7.4