From nobody Sat Dec 28 11:53:56 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1496948797238224.48224397011757; Thu, 8 Jun 2017 12:06:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9E4AA21A143C7; Thu, 8 Jun 2017 12:05:26 -0700 (PDT) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 1A61821A143C1 for ; Thu, 8 Jun 2017 12:05:25 -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 6AEED80D; Thu, 8 Jun 2017 12:06:34 -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 31D713F557; Thu, 8 Jun 2017 12:06:33 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org From: Supreeth Venkatesh To: edk2-devel@lists.01.org Date: Thu, 8 Jun 2017 20:05:28 +0100 Message-Id: <1496948731-34199-8-git-send-email-supreeth.venkatesh@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496948731-34199-1-git-send-email-supreeth.venkatesh@arm.com> References: <1496948731-34199-1-git-send-email-supreeth.venkatesh@arm.com> Subject: [edk2] [PATCH v2 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: , Cc: Jiewen Yao , leif.lindholm@arm.com, ard.biesheuvel@linaro.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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_DEFI= NED", "DEFAULT", "BASE", \ "SECURITY_CORE", "COMBINED_PEIM_DRIVER", "PIC= _PEIM", "RELOCATABLE_PEIM", \ - "PE32_PEIM", "BS_DRIVER", "RT_DRIVER", "SAL_R= T_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE"): + "PE32_PEIM", "BS_DRIVER", "RT_DRIV= ER", "SAL_RT_DRIVER", "APPLICATION", "ACPITABLE", "SMM_CORE", "SMM_STANDALO= NE", "SMM_CORE_STANDALONE"): raise Warning("Unknown Module type '%s'" % self.__Token, self.= FileName, self.CurrentLineNumber) return self.__Token =20 @@ -3716,7 +3716,7 @@ class FdfParser: =20 Type =3D self.__Token.strip().upper() if Type not in ("RAW", "FREEFORM", "SEC", "PEI_CORE", "PEIM",\ - "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLI= CATION", "FV_IMAGE", "SMM", "SMM_CORE"): + "PEI_DXE_COMBO", "DRIVER", "DXE_CORE", "APPLI= CATION", "FV_IMAGE", "SMM", "SMM_CORE", "SMM_STANDALONE"): raise Warning("Unknown FV type '%s'" % self.__Token, self.File= Name, self.CurrentLineNumber) =20 if not self.__IsToken("=3D"): diff --git a/BaseTools/Source/Python/GenFds/Ffs.py b/BaseTools/Source/Pytho= n/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', } =20 # 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', } =20 # 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..1f0250f 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 =3D=3D 'SMM_CORE' and int(self.PiSpecVersion, 1= 6) < 0x0001000A: EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE modu= le type can't be used in the module with PI_SPECIFICATION_VERSION less than= 0x0001000A", File=3Dself.InfFileName) =20 =20 + if self.ModuleType =3D=3D 'SMM_CORE_STANDALONE' and int(self.PiSpe= cVersion, 16) < 0x00010032: + EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE_STAN= DALONE module type can't be used in the module with PI_SPECIFICATION_VERSIO= N less than 0x00010032", File=3Dself.InfFileName) + if Inf._Defs !=3D None and len(Inf._Defs) > 0: self.OptRomDefs.update(Inf._Defs) =20 --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel