summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/GenDepex.py
diff options
context:
space:
mode:
authorSupreeth Venkatesh <supreeth.venkatesh@arm.com>2017-06-27 00:47:39 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-07-07 10:49:13 +0800
commit5a9c3e3e588007d3256877f4834a22bde68cae7b (patch)
treea4901ea6b0c3c2ffbc0bff840bc405c1d65605db /BaseTools/Source/Python/AutoGen/GenDepex.py
parent87d9a2b3160ee93c111b419c477ae85dfc3d18dd (diff)
downloadedk2-5a9c3e3e588007d3256877f4834a22bde68cae7b.tar.gz
edk2-5a9c3e3e588007d3256877f4834a22bde68cae7b.tar.bz2
edk2-5a9c3e3e588007d3256877f4834a22bde68cae7b.zip
BaseTools/AutoGen: auto generate MM template APIs and dependencies.
This patch adds changes to auto generate MM_CORE_STANDALONE and MM_STANDALONE Entry Point templates. Also, it adds changes to help auto generate dependency expressions for MM_STANDALONE modules. PI Specification v1.5 specifies Management Mode System Table (MMST) which is a collection of common services for managing MMRAM allocation and providing basic I/O services. MMST is similar to the UEFI System Table. (Currently, EFI_SMM_SYSTEM_TABLE2 defines Management Mode System Table) Some of auto generated MM_CORE_STANDALONE and MM_STANDALONE template APIs use MMST as parameter. 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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/GenDepex.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/GenDepex.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py
index 5923a75ab7..7aa22bd944 100644
--- a/BaseTools/Source/Python/AutoGen/GenDepex.py
+++ b/BaseTools/Source/Python/AutoGen/GenDepex.py
@@ -42,6 +42,8 @@ gType2Phase = {
"UEFI_DRIVER" : "DXE",
"UEFI_APPLICATION" : "DXE",
"SMM_CORE" : "DXE",
+ "MM_STANDALONE" : "MM",
+ "MM_CORE_STANDALONE" : "MM",
}
## Convert dependency expression string into EFI internal representation
@@ -98,6 +100,19 @@ class DependencyExpression:
"FALSE" : 0x07,
"END" : 0x08,
"SOR" : 0x09
+ },
+
+ "MM" : {
+ "BEFORE": 0x00,
+ "AFTER" : 0x01,
+ "PUSH" : 0x02,
+ "AND" : 0x03,
+ "OR" : 0x04,
+ "NOT" : 0x05,
+ "TRUE" : 0x06,
+ "FALSE" : 0x07,
+ "END" : 0x08,
+ "SOR" : 0x09
}
}
@@ -289,7 +304,7 @@ class DependencyExpression:
return
# don't generate depex if all operands are architecture protocols
- if self.ModuleType in ['UEFI_DRIVER', 'DXE_DRIVER', 'DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER', 'DXE_SMM_DRIVER'] and \
+ if self.ModuleType in ['UEFI_DRIVER', 'DXE_DRIVER', 'DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER', 'DXE_SMM_DRIVER', 'MM_STANDALONE'] and \
Op == 'AND' and \
self.ArchProtocols == set([GuidStructureStringToGuidString(Guid) for Guid in AllOperand]):
self.PostfixNotation = []