mirror of https://github.com/acidanthera/audk.git
BaseTools/GenFds: register MM Modules and MM FV file types.
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> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
96f73940cb
commit
b19df64081
|
@ -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("="):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue