From: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
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 <jiewen.yao@intel.com>
Subject: [PATCH v5 07/10] BaseTools/GenFds: register MM Modules and MM FV file types.
Date: Mon, 26 Jun 2017 17:47:43 +0100 [thread overview]
Message-ID: <1498495666-32452-8-git-send-email-supreeth.venkatesh@arm.com> (raw)
In-Reply-To: <1498495666-32452-1-git-send-email-supreeth.venkatesh@arm.com>
This patch verifies MM_CORE_STANDALONE module compatibility with PI
specification version.
Also, it registers MM_STANDALONE/MM_CORE_STANDALONE modules with
FdfParser class and provides mapping between MM_STANDALONE and
MM_CORE_STANDALONE module type in FDF with
EFI_FV_FILETYPE_MM_STANDALONE and EFI_FV_FILETYPE_MM_CORE_STANDALONE file types
in GenFfs.
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>
---
BaseTools/Source/Python/GenFds/FdfParser.py | 4 ++--
BaseTools/Source/Python/GenFds/Ffs.py | 8 ++++++--
BaseTools/Source/Python/GenFds/FfsInfStatement.py | 3 +++
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index a1825ba..2782be4 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", "MM_STANDALONE", "MM_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", "MM_STANDALONE", "MM_CORE_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..a417812 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',
+ 'MM_STANDALONE' : 'EFI_FV_FILETYPE_MM_STANDALONE',
+ 'MM_CORE_STANDALONE' : 'EFI_FV_FILETYPE_MM_CORE_STANDALONE'
}
# mapping between FILE type in FDF and file type for GenFfs
@@ -50,7 +52,9 @@ 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',
+ 'MM_STANDALONE' : 'EFI_FV_FILETYPE_MM_STANDALONE',
+ 'MM_CORE_STANDALONE' : 'EFI_FV_FILETYPE_MM_CORE_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..c61c227 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 == 'MM_CORE_STANDALONE' and int(self.PiSpecVersion, 16) < 0x00010032:
+ EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "MM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.InfFileName)
+
if Inf._Defs != None and len(Inf._Defs) > 0:
self.OptRomDefs.update(Inf._Defs)
--
2.7.4
next prev parent reply other threads:[~2017-06-26 16:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 16:47 [PATCH v5 00/10] *** BaseTools: Tools change to support MM Interface in PI v1.5 Specification *** Supreeth Venkatesh
2017-06-26 16:47 ` [PATCH v5 01/10] BaseTools/GenFfs: add FFS file types for MM modules Supreeth Venkatesh
2017-06-29 8:52 ` Gao, Liming
2017-06-26 16:47 ` [PATCH v5 02/10] BaseTools/GenFw: recognize MM file types as EFI Boot Service Drivers Supreeth Venkatesh
2017-06-26 16:47 ` [PATCH v5 03/10] BaseTools/AutoGen: auto generate MM template APIs and dependencies Supreeth Venkatesh
2017-06-26 16:47 ` [PATCH v5 04/10] BaseTools/Common: add MM Module data types Supreeth Venkatesh
2017-06-26 16:47 ` [PATCH v5 05/10] BaseTools/Common: add support in FDF Parser to parse MM Modules Supreeth Venkatesh
2017-06-26 16:47 ` [PATCH v5 06/10] BaseTools/CommonDataClass: register " Supreeth Venkatesh
2017-06-26 16:47 ` Supreeth Venkatesh [this message]
2017-06-26 16:47 ` [PATCH v5 08/10] BaseTools/build: register MM module types with build tools Supreeth Venkatesh
2017-06-26 16:47 ` [PATCH v5 09/10] BaseTools/Workspace: check MM module type compatibility with PI version Supreeth Venkatesh
2017-06-26 16:47 ` [PATCH v5 10/10] BaseTools/Eot: register MM Module types with FFS class Supreeth Venkatesh
2017-06-26 19:47 ` [PATCH v5 00/10] *** BaseTools: Tools change to support MM Interface in PI v1.5 Specification *** Laszlo Ersek
2017-07-07 2:56 ` Zhu, Yonghong
2017-07-07 17:09 ` Supreeth Venkatesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498495666-32452-8-git-send-email-supreeth.venkatesh@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox