BaseTools/Common: add MM Module data types.
[mirror_edk2.git] / BaseTools / Source / Python / Common / DataType.py
1 ## @file
2 # This file is used to define common static strings used by INF/DEC/DSC files
3 #
4 # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
5 # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
6 # This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
10 #
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 ##
15 # Common Definitions
16 #
17 TAB_SPLIT = '.'
18 TAB_COMMENT_EDK_START = '/*'
19 TAB_COMMENT_EDK_END = '*/'
20 TAB_COMMENT_EDK_SPLIT = '//'
21 TAB_COMMENT_SPLIT = '#'
22 TAB_SPECIAL_COMMENT = '##'
23 TAB_EQUAL_SPLIT = '='
24 TAB_VALUE_SPLIT = '|'
25 TAB_COMMA_SPLIT = ','
26 TAB_SPACE_SPLIT = ' '
27 TAB_SEMI_COLON_SPLIT = ';'
28 TAB_SECTION_START = '['
29 TAB_SECTION_END = ']'
30 TAB_OPTION_START = '<'
31 TAB_OPTION_END = '>'
32 TAB_SLASH = '\\'
33 TAB_BACK_SLASH = '/'
34 TAB_LINE_BREAK = '\n'
35 TAB_PRINTCHAR_VT = '\x0b'
36 TAB_PRINTCHAR_BS = '\b'
37 TAB_PRINTCHAR_NUL = '\0'
38 TAB_UINT8 = 'UINT8'
39 TAB_UINT16 = 'UINT16'
40 TAB_UINT32 = 'UINT32'
41 TAB_UINT64 = 'UINT64'
42 TAB_VOID = 'VOID*'
43
44 TAB_EDK_SOURCE = '$(EDK_SOURCE)'
45 TAB_EFI_SOURCE = '$(EFI_SOURCE)'
46 TAB_WORKSPACE = '$(WORKSPACE)'
47
48 TAB_ARCH_NULL = ''
49 TAB_ARCH_COMMON = 'COMMON'
50 TAB_ARCH_IA32 = 'IA32'
51 TAB_ARCH_X64 = 'X64'
52 TAB_ARCH_IPF = 'IPF'
53 TAB_ARCH_ARM = 'ARM'
54 TAB_ARCH_EBC = 'EBC'
55 TAB_ARCH_AARCH64 = 'AARCH64'
56
57 ARCH_LIST = [TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_IPF, TAB_ARCH_ARM, TAB_ARCH_EBC, TAB_ARCH_AARCH64]
58 ARCH_LIST_FULL = [TAB_ARCH_COMMON] + ARCH_LIST
59
60 SUP_MODULE_BASE = 'BASE'
61 SUP_MODULE_SEC = 'SEC'
62 SUP_MODULE_PEI_CORE = 'PEI_CORE'
63 SUP_MODULE_PEIM = 'PEIM'
64 SUP_MODULE_DXE_CORE = 'DXE_CORE'
65 SUP_MODULE_DXE_DRIVER = 'DXE_DRIVER'
66 SUP_MODULE_DXE_RUNTIME_DRIVER = 'DXE_RUNTIME_DRIVER'
67 SUP_MODULE_DXE_SAL_DRIVER = 'DXE_SAL_DRIVER'
68 SUP_MODULE_DXE_SMM_DRIVER = 'DXE_SMM_DRIVER'
69 SUP_MODULE_UEFI_DRIVER = 'UEFI_DRIVER'
70 SUP_MODULE_UEFI_APPLICATION = 'UEFI_APPLICATION'
71 SUP_MODULE_USER_DEFINED = 'USER_DEFINED'
72 SUP_MODULE_SMM_CORE = 'SMM_CORE'
73 SUP_MODULE_MM_STANDALONE = 'MM_STANDALONE'
74 SUP_MODULE_MM_CORE_STANDALONE = 'MM_CORE_STANDALONE'
75
76 SUP_MODULE_LIST = [SUP_MODULE_BASE, SUP_MODULE_SEC, SUP_MODULE_PEI_CORE, SUP_MODULE_PEIM, SUP_MODULE_DXE_CORE, SUP_MODULE_DXE_DRIVER, \
77 SUP_MODULE_DXE_RUNTIME_DRIVER, SUP_MODULE_DXE_SAL_DRIVER, SUP_MODULE_DXE_SMM_DRIVER, SUP_MODULE_UEFI_DRIVER, \
78 SUP_MODULE_UEFI_APPLICATION, SUP_MODULE_USER_DEFINED, SUP_MODULE_SMM_CORE, SUP_MODULE_MM_STANDALONE, SUP_MODULE_MM_CORE_STANDALONE]
79 SUP_MODULE_LIST_STRING = TAB_VALUE_SPLIT.join(l for l in SUP_MODULE_LIST)
80
81 EDK_COMPONENT_TYPE_LIBRARY = 'LIBRARY'
82 EDK_COMPONENT_TYPE_SECUARITY_CORE = 'SECUARITY_CORE'
83 EDK_COMPONENT_TYPE_PEI_CORE = 'PEI_CORE'
84 EDK_COMPONENT_TYPE_COMBINED_PEIM_DRIVER = 'COMBINED_PEIM_DRIVER'
85 EDK_COMPONENT_TYPE_PIC_PEIM = 'PIC_PEIM'
86 EDK_COMPONENT_TYPE_RELOCATABLE_PEIM = 'RELOCATABLE_PEIM'
87 EDK_COMPONENT_TYPE_BS_DRIVER = 'BS_DRIVER'
88 EDK_COMPONENT_TYPE_RT_DRIVER = 'RT_DRIVER'
89 EDK_COMPONENT_TYPE_SAL_RT_DRIVER = 'SAL_RT_DRIVER'
90 EDK_COMPONENT_TYPE_APPLICATION = 'APPLICATION'
91 EDK_NAME = 'EDK'
92 EDKII_NAME = 'EDKII'
93
94 BINARY_FILE_TYPE_FW = 'FW'
95 BINARY_FILE_TYPE_GUID = 'GUID'
96 BINARY_FILE_TYPE_PREEFORM = 'PREEFORM'
97 BINARY_FILE_TYPE_UEFI_APP = 'UEFI_APP'
98 BINARY_FILE_TYPE_UNI_UI = 'UNI_UI'
99 BINARY_FILE_TYPE_UNI_VER = 'UNI_VER'
100 BINARY_FILE_TYPE_LIB = 'LIB'
101 BINARY_FILE_TYPE_PE32 = 'PE32'
102 BINARY_FILE_TYPE_PIC = 'PIC'
103 BINARY_FILE_TYPE_PEI_DEPEX = 'PEI_DEPEX'
104 BINARY_FILE_TYPE_DXE_DEPEX = 'DXE_DEPEX'
105 BINARY_FILE_TYPE_SMM_DEPEX = 'SMM_DEPEX'
106 BINARY_FILE_TYPE_TE = 'TE'
107 BINARY_FILE_TYPE_VER = 'VER'
108 BINARY_FILE_TYPE_UI = 'UI'
109 BINARY_FILE_TYPE_BIN = 'BIN'
110 BINARY_FILE_TYPE_FV = 'FV'
111
112 PLATFORM_COMPONENT_TYPE_LIBRARY = 'LIBRARY'
113 PLATFORM_COMPONENT_TYPE_LIBRARY_CLASS = 'LIBRARY_CLASS'
114 PLATFORM_COMPONENT_TYPE_MODULE = 'MODULE'
115
116 TAB_LIBRARIES = 'Libraries'
117
118 TAB_SOURCES = 'Sources'
119 TAB_SOURCES_COMMON = TAB_SOURCES + TAB_SPLIT + TAB_ARCH_COMMON
120 TAB_SOURCES_IA32 = TAB_SOURCES + TAB_SPLIT + TAB_ARCH_IA32
121 TAB_SOURCES_X64 = TAB_SOURCES + TAB_SPLIT + TAB_ARCH_X64
122 TAB_SOURCES_IPF = TAB_SOURCES + TAB_SPLIT + TAB_ARCH_IPF
123 TAB_SOURCES_ARM = TAB_SOURCES + TAB_SPLIT + TAB_ARCH_ARM
124 TAB_SOURCES_EBC = TAB_SOURCES + TAB_SPLIT + TAB_ARCH_EBC
125 TAB_SOURCES_AARCH64 = TAB_SOURCES + TAB_SPLIT + TAB_ARCH_AARCH64
126
127 TAB_BINARIES = 'Binaries'
128 TAB_BINARIES_COMMON = TAB_BINARIES + TAB_SPLIT + TAB_ARCH_COMMON
129 TAB_BINARIES_IA32 = TAB_BINARIES + TAB_SPLIT + TAB_ARCH_IA32
130 TAB_BINARIES_X64 = TAB_BINARIES + TAB_SPLIT + TAB_ARCH_X64
131 TAB_BINARIES_IPF = TAB_BINARIES + TAB_SPLIT + TAB_ARCH_IPF
132 TAB_BINARIES_ARM = TAB_BINARIES + TAB_SPLIT + TAB_ARCH_ARM
133 TAB_BINARIES_EBC = TAB_BINARIES + TAB_SPLIT + TAB_ARCH_EBC
134 TAB_BINARIES_AARCH64 = TAB_BINARIES + TAB_SPLIT + TAB_ARCH_AARCH64
135
136 TAB_INCLUDES = 'Includes'
137 TAB_INCLUDES_COMMON = TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_COMMON
138 TAB_INCLUDES_IA32 = TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_IA32
139 TAB_INCLUDES_X64 = TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_X64
140 TAB_INCLUDES_IPF = TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_IPF
141 TAB_INCLUDES_ARM = TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_ARM
142 TAB_INCLUDES_EBC = TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_EBC
143 TAB_INCLUDES_AARCH64 = TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_AARCH64
144
145 TAB_GUIDS = 'Guids'
146 TAB_GUIDS_COMMON = TAB_GUIDS + TAB_SPLIT + TAB_ARCH_COMMON
147 TAB_GUIDS_IA32 = TAB_GUIDS + TAB_SPLIT + TAB_ARCH_IA32
148 TAB_GUIDS_X64 = TAB_GUIDS + TAB_SPLIT + TAB_ARCH_X64
149 TAB_GUIDS_IPF = TAB_GUIDS + TAB_SPLIT + TAB_ARCH_IPF
150 TAB_GUIDS_ARM = TAB_GUIDS + TAB_SPLIT + TAB_ARCH_ARM
151 TAB_GUIDS_EBC = TAB_GUIDS + TAB_SPLIT + TAB_ARCH_EBC
152 TAB_GUIDS_AARCH64 = TAB_GUIDS + TAB_SPLIT + TAB_ARCH_AARCH64
153
154 TAB_PROTOCOLS = 'Protocols'
155 TAB_PROTOCOLS_COMMON = TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_COMMON
156 TAB_PROTOCOLS_IA32 = TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_IA32
157 TAB_PROTOCOLS_X64 = TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_X64
158 TAB_PROTOCOLS_IPF = TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_IPF
159 TAB_PROTOCOLS_ARM = TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_ARM
160 TAB_PROTOCOLS_EBC = TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_EBC
161 TAB_PROTOCOLS_AARCH64 = TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_AARCH64
162
163 TAB_PPIS = 'Ppis'
164 TAB_PPIS_COMMON = TAB_PPIS + TAB_SPLIT + TAB_ARCH_COMMON
165 TAB_PPIS_IA32 = TAB_PPIS + TAB_SPLIT + TAB_ARCH_IA32
166 TAB_PPIS_X64 = TAB_PPIS + TAB_SPLIT + TAB_ARCH_X64
167 TAB_PPIS_IPF = TAB_PPIS + TAB_SPLIT + TAB_ARCH_IPF
168 TAB_PPIS_ARM = TAB_PPIS + TAB_SPLIT + TAB_ARCH_ARM
169 TAB_PPIS_EBC = TAB_PPIS + TAB_SPLIT + TAB_ARCH_EBC
170 TAB_PPIS_AARCH64 = TAB_PPIS + TAB_SPLIT + TAB_ARCH_AARCH64
171
172 TAB_LIBRARY_CLASSES = 'LibraryClasses'
173 TAB_LIBRARY_CLASSES_COMMON = TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_COMMON
174 TAB_LIBRARY_CLASSES_IA32 = TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_IA32
175 TAB_LIBRARY_CLASSES_X64 = TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_X64
176 TAB_LIBRARY_CLASSES_IPF = TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_IPF
177 TAB_LIBRARY_CLASSES_ARM = TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_ARM
178 TAB_LIBRARY_CLASSES_EBC = TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_EBC
179 TAB_LIBRARY_CLASSES_AARCH64 = TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_AARCH64
180
181 TAB_PACKAGES = 'Packages'
182 TAB_PACKAGES_COMMON = TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_COMMON
183 TAB_PACKAGES_IA32 = TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_IA32
184 TAB_PACKAGES_X64 = TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_X64
185 TAB_PACKAGES_IPF = TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_IPF
186 TAB_PACKAGES_ARM = TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_ARM
187 TAB_PACKAGES_EBC = TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_EBC
188 TAB_PACKAGES_AARCH64 = TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_AARCH64
189
190 TAB_PCDS = 'Pcds'
191 TAB_PCDS_FIXED_AT_BUILD = 'FixedAtBuild'
192 TAB_PCDS_PATCHABLE_IN_MODULE = 'PatchableInModule'
193 TAB_PCDS_FEATURE_FLAG = 'FeatureFlag'
194 TAB_PCDS_DYNAMIC_EX = 'DynamicEx'
195 TAB_PCDS_DYNAMIC_EX_DEFAULT = 'DynamicExDefault'
196 TAB_PCDS_DYNAMIC_EX_VPD = 'DynamicExVpd'
197 TAB_PCDS_DYNAMIC_EX_HII = 'DynamicExHii'
198 TAB_PCDS_DYNAMIC = 'Dynamic'
199 TAB_PCDS_DYNAMIC_DEFAULT = 'DynamicDefault'
200 TAB_PCDS_DYNAMIC_VPD = 'DynamicVpd'
201 TAB_PCDS_DYNAMIC_HII = 'DynamicHii'
202
203 PCD_DYNAMIC_TYPE_LIST = [TAB_PCDS_DYNAMIC, TAB_PCDS_DYNAMIC_DEFAULT, TAB_PCDS_DYNAMIC_VPD, TAB_PCDS_DYNAMIC_HII]
204 PCD_DYNAMIC_EX_TYPE_LIST = [TAB_PCDS_DYNAMIC_EX, TAB_PCDS_DYNAMIC_EX_DEFAULT, TAB_PCDS_DYNAMIC_EX_VPD, TAB_PCDS_DYNAMIC_EX_HII]
205
206 ## Dynamic-ex PCD types
207 gDynamicExPcd = [TAB_PCDS_DYNAMIC_EX, TAB_PCDS_DYNAMIC_EX_DEFAULT, TAB_PCDS_DYNAMIC_EX_VPD, TAB_PCDS_DYNAMIC_EX_HII]
208
209 TAB_PCDS_FIXED_AT_BUILD_NULL = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD
210 TAB_PCDS_FIXED_AT_BUILD_COMMON = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLIT + TAB_ARCH_COMMON
211 TAB_PCDS_FIXED_AT_BUILD_IA32 = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLIT + TAB_ARCH_IA32
212 TAB_PCDS_FIXED_AT_BUILD_X64 = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLIT + TAB_ARCH_X64
213 TAB_PCDS_FIXED_AT_BUILD_IPF = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLIT + TAB_ARCH_IPF
214 TAB_PCDS_FIXED_AT_BUILD_ARM = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLIT + TAB_ARCH_ARM
215 TAB_PCDS_FIXED_AT_BUILD_EBC = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLIT + TAB_ARCH_EBC
216 TAB_PCDS_FIXED_AT_BUILD_AARCH64 = TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_SPLIT + TAB_ARCH_AARCH64
217
218 TAB_PCDS_PATCHABLE_IN_MODULE_NULL = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE
219 TAB_PCDS_PATCHABLE_IN_MODULE_COMMON = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE + TAB_SPLIT + TAB_ARCH_COMMON
220 TAB_PCDS_PATCHABLE_IN_MODULE_IA32 = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE + TAB_SPLIT + TAB_ARCH_IA32
221 TAB_PCDS_PATCHABLE_IN_MODULE_X64 = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE + TAB_SPLIT + TAB_ARCH_X64
222 TAB_PCDS_PATCHABLE_IN_MODULE_IPF = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE + TAB_SPLIT + TAB_ARCH_IPF
223 TAB_PCDS_PATCHABLE_IN_MODULE_ARM = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE + TAB_SPLIT + TAB_ARCH_ARM
224 TAB_PCDS_PATCHABLE_IN_MODULE_EBC = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE + TAB_SPLIT + TAB_ARCH_EBC
225 TAB_PCDS_PATCHABLE_IN_MODULE_AARCH64 = TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODULE + TAB_SPLIT + TAB_ARCH_AARCH64
226
227 TAB_PCDS_FEATURE_FLAG_NULL = TAB_PCDS + TAB_PCDS_FEATURE_FLAG
228 TAB_PCDS_FEATURE_FLAG_COMMON = TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT + TAB_ARCH_COMMON
229 TAB_PCDS_FEATURE_FLAG_IA32 = TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT + TAB_ARCH_IA32
230 TAB_PCDS_FEATURE_FLAG_X64 = TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT + TAB_ARCH_X64
231 TAB_PCDS_FEATURE_FLAG_IPF = TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT + TAB_ARCH_IPF
232 TAB_PCDS_FEATURE_FLAG_ARM = TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT + TAB_ARCH_ARM
233 TAB_PCDS_FEATURE_FLAG_EBC = TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT + TAB_ARCH_EBC
234 TAB_PCDS_FEATURE_FLAG_AARCH64 = TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT + TAB_ARCH_AARCH64
235
236 TAB_PCDS_DYNAMIC_EX_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC_EX
237 TAB_PCDS_DYNAMIC_EX_DEFAULT_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC_EX_DEFAULT
238 TAB_PCDS_DYNAMIC_EX_HII_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC_EX_HII
239 TAB_PCDS_DYNAMIC_EX_VPD_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC_EX_VPD
240 TAB_PCDS_DYNAMIC_EX_COMMON = TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + TAB_ARCH_COMMON
241 TAB_PCDS_DYNAMIC_EX_IA32 = TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + TAB_ARCH_IA32
242 TAB_PCDS_DYNAMIC_EX_X64 = TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + TAB_ARCH_X64
243 TAB_PCDS_DYNAMIC_EX_IPF = TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + TAB_ARCH_IPF
244 TAB_PCDS_DYNAMIC_EX_ARM = TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + TAB_ARCH_ARM
245 TAB_PCDS_DYNAMIC_EX_EBC = TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + TAB_ARCH_EBC
246 TAB_PCDS_DYNAMIC_EX_AARCH64 = TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + TAB_ARCH_AARCH64
247
248 TAB_PCDS_DYNAMIC_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC
249 TAB_PCDS_DYNAMIC_DEFAULT_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC_DEFAULT
250 TAB_PCDS_DYNAMIC_HII_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC_HII
251 TAB_PCDS_DYNAMIC_VPD_NULL = TAB_PCDS + TAB_PCDS_DYNAMIC_VPD
252 TAB_PCDS_DYNAMIC_COMMON = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_COMMON
253 TAB_PCDS_DYNAMIC_IA32 = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_IA32
254 TAB_PCDS_DYNAMIC_X64 = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_X64
255 TAB_PCDS_DYNAMIC_IPF = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_IPF
256 TAB_PCDS_DYNAMIC_ARM = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_ARM
257 TAB_PCDS_DYNAMIC_EBC = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_EBC
258 TAB_PCDS_DYNAMIC_AARCH64 = TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARCH_AARCH64
259
260 TAB_PCD_DYNAMIC_TYPE_LIST = [TAB_PCDS_DYNAMIC_DEFAULT_NULL, TAB_PCDS_DYNAMIC_VPD_NULL, TAB_PCDS_DYNAMIC_HII_NULL]
261 TAB_PCD_DYNAMIC_EX_TYPE_LIST = [TAB_PCDS_DYNAMIC_EX_DEFAULT_NULL, TAB_PCDS_DYNAMIC_EX_VPD_NULL, TAB_PCDS_DYNAMIC_EX_HII_NULL]
262
263 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE = 'PcdLoadFixAddressPeiCodePageNumber'
264 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE_DATA_TYPE = 'UINT32'
265 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE = 'PcdLoadFixAddressBootTimeCodePageNumber'
266 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE_DATA_TYPE = 'UINT32'
267 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE = 'PcdLoadFixAddressRuntimeCodePageNumber'
268 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE_DATA_TYPE = 'UINT32'
269 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE = 'PcdLoadFixAddressSmmCodePageNumber'
270 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE_DATA_TYPE = 'UINT32'
271 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_LIST = [TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE, \
272 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_DXE_PAGE_SIZE, \
273 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_RUNTIME_PAGE_SIZE, \
274 TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_SMM_PAGE_SIZE]
275
276 TAB_DEPEX = 'Depex'
277 TAB_DEPEX_COMMON = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_COMMON
278 TAB_DEPEX_IA32 = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_IA32
279 TAB_DEPEX_X64 = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_X64
280 TAB_DEPEX_IPF = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_IPF
281 TAB_DEPEX_ARM = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_ARM
282 TAB_DEPEX_EBC = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_EBC
283 TAB_DEPEX_AARCH64 = TAB_DEPEX + TAB_SPLIT + TAB_ARCH_AARCH64
284
285 TAB_SKUIDS = 'SkuIds'
286
287 TAB_LIBRARIES = 'Libraries'
288 TAB_LIBRARIES_COMMON = TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_COMMON
289 TAB_LIBRARIES_IA32 = TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_IA32
290 TAB_LIBRARIES_X64 = TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_X64
291 TAB_LIBRARIES_IPF = TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_IPF
292 TAB_LIBRARIES_ARM = TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_ARM
293 TAB_LIBRARIES_EBC = TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_EBC
294 TAB_LIBRARIES_AARCH64 = TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_AARCH64
295
296 TAB_COMPONENTS = 'Components'
297 TAB_COMPONENTS_COMMON = TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_COMMON
298 TAB_COMPONENTS_IA32 = TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_IA32
299 TAB_COMPONENTS_X64 = TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_X64
300 TAB_COMPONENTS_IPF = TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_IPF
301 TAB_COMPONENTS_ARM = TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_ARM
302 TAB_COMPONENTS_EBC = TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_EBC
303 TAB_COMPONENTS_AARCH64 = TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_AARCH64
304
305 TAB_COMPONENTS_SOURCE_OVERRIDE_PATH = 'SOURCE_OVERRIDE_PATH'
306
307 TAB_BUILD_OPTIONS = 'BuildOptions'
308
309 TAB_DEFINE = 'DEFINE'
310 TAB_NMAKE = 'Nmake'
311 TAB_USER_EXTENSIONS = 'UserExtensions'
312 TAB_INCLUDE = '!include'
313
314 #
315 # Common Define
316 #
317 TAB_COMMON_DEFINES = 'Defines'
318
319 #
320 # Inf Definitions
321 #
322 TAB_INF_DEFINES = TAB_COMMON_DEFINES
323 TAB_INF_DEFINES_INF_VERSION = 'INF_VERSION'
324 TAB_INF_DEFINES_BASE_NAME = 'BASE_NAME'
325 TAB_INF_DEFINES_FILE_GUID = 'FILE_GUID'
326 TAB_INF_DEFINES_MODULE_TYPE = 'MODULE_TYPE'
327 TAB_INF_DEFINES_EFI_SPECIFICATION_VERSION = 'EFI_SPECIFICATION_VERSION'
328 TAB_INF_DEFINES_UEFI_SPECIFICATION_VERSION = 'UEFI_SPECIFICATION_VERSION'
329 TAB_INF_DEFINES_PI_SPECIFICATION_VERSION = 'PI_SPECIFICATION_VERSION'
330 TAB_INF_DEFINES_EDK_RELEASE_VERSION = 'EDK_RELEASE_VERSION'
331 TAB_INF_DEFINES_BINARY_MODULE = 'BINARY_MODULE'
332 TAB_INF_DEFINES_LIBRARY_CLASS = 'LIBRARY_CLASS'
333 TAB_INF_DEFINES_COMPONENT_TYPE = 'COMPONENT_TYPE'
334 TAB_INF_DEFINES_MAKEFILE_NAME = 'MAKEFILE_NAME'
335 TAB_INF_DEFINES_DPX_SOURCE = 'DPX_SOURCE'
336 TAB_INF_DEFINES_BUILD_NUMBER = 'BUILD_NUMBER'
337 TAB_INF_DEFINES_BUILD_TYPE = 'BUILD_TYPE'
338 TAB_INF_DEFINES_FFS_EXT = 'FFS_EXT'
339 TAB_INF_DEFINES_FV_EXT = 'FV_EXT'
340 TAB_INF_DEFINES_SOURCE_FV = 'SOURCE_FV'
341 TAB_INF_DEFINES_VERSION_NUMBER = 'VERSION_NUMBER'
342 TAB_INF_DEFINES_VERSION = 'VERSION' # for Edk inf, the same as VERSION_NUMBER
343 TAB_INF_DEFINES_VERSION_STRING = 'VERSION_STRING'
344 TAB_INF_DEFINES_PCD_IS_DRIVER = 'PCD_IS_DRIVER'
345 TAB_INF_DEFINES_TIANO_EDK_FLASHMAP_H = 'TIANO_EDK_FLASHMAP_H'
346 TAB_INF_DEFINES_ENTRY_POINT = 'ENTRY_POINT'
347 TAB_INF_DEFINES_UNLOAD_IMAGE = 'UNLOAD_IMAGE'
348 TAB_INF_DEFINES_CONSTRUCTOR = 'CONSTRUCTOR'
349 TAB_INF_DEFINES_DESTRUCTOR = 'DESTRUCTOR'
350 TAB_INF_DEFINES_DEFINE = 'DEFINE'
351 TAB_INF_DEFINES_SPEC = 'SPEC'
352 TAB_INF_DEFINES_CUSTOM_MAKEFILE = 'CUSTOM_MAKEFILE'
353 TAB_INF_DEFINES_MACRO = '__MACROS__'
354 TAB_INF_DEFINES_SHADOW = 'SHADOW'
355 TAB_INF_FIXED_PCD = 'FixedPcd'
356 TAB_INF_FEATURE_PCD = 'FeaturePcd'
357 TAB_INF_PATCH_PCD = 'PatchPcd'
358 TAB_INF_PCD = 'Pcd'
359 TAB_INF_PCD_EX = 'PcdEx'
360 TAB_INF_USAGE_PRO = 'PRODUCES'
361 TAB_INF_USAGE_SOME_PRO = 'SOMETIMES_PRODUCES'
362 TAB_INF_USAGE_CON = 'CONSUMES'
363 TAB_INF_USAGE_SOME_CON = 'SOMETIMES_CONSUMES'
364 TAB_INF_USAGE_NOTIFY = 'NOTIFY'
365 TAB_INF_USAGE_TO_START = 'TO_START'
366 TAB_INF_USAGE_BY_START = 'BY_START'
367 TAB_INF_GUIDTYPE_EVENT = 'Event'
368 TAB_INF_GUIDTYPE_FILE = 'File'
369 TAB_INF_GUIDTYPE_FV = 'FV'
370 TAB_INF_GUIDTYPE_GUID = 'GUID'
371 TAB_INF_GUIDTYPE_HII = 'HII'
372 TAB_INF_GUIDTYPE_HOB = 'HOB'
373 TAB_INF_GUIDTYPE_ST = 'SystemTable'
374 TAB_INF_GUIDTYPE_TSG = 'TokenSpaceGuid'
375 TAB_INF_GUIDTYPE_VAR = 'Variable'
376 TAB_INF_GUIDTYPE_PROTOCOL = 'PROTOCOL'
377 TAB_INF_GUIDTYPE_PPI = 'PPI'
378 TAB_INF_USAGE_UNDEFINED = 'UNDEFINED'
379
380 #
381 # Dec Definitions
382 #
383 TAB_DEC_DEFINES = TAB_COMMON_DEFINES
384 TAB_DEC_DEFINES_DEC_SPECIFICATION = 'DEC_SPECIFICATION'
385 TAB_DEC_DEFINES_PACKAGE_NAME = 'PACKAGE_NAME'
386 TAB_DEC_DEFINES_PACKAGE_GUID = 'PACKAGE_GUID'
387 TAB_DEC_DEFINES_PACKAGE_VERSION = 'PACKAGE_VERSION'
388 TAB_DEC_DEFINES_PKG_UNI_FILE = 'PKG_UNI_FILE'
389
390 #
391 # Dsc Definitions
392 #
393 TAB_DSC_DEFINES = TAB_COMMON_DEFINES
394 TAB_DSC_DEFINES_PLATFORM_NAME = 'PLATFORM_NAME'
395 TAB_DSC_DEFINES_PLATFORM_GUID = 'PLATFORM_GUID'
396 TAB_DSC_DEFINES_PLATFORM_VERSION = 'PLATFORM_VERSION'
397 TAB_DSC_DEFINES_DSC_SPECIFICATION = 'DSC_SPECIFICATION'
398 TAB_DSC_DEFINES_OUTPUT_DIRECTORY = 'OUTPUT_DIRECTORY'
399 TAB_DSC_DEFINES_SUPPORTED_ARCHITECTURES = 'SUPPORTED_ARCHITECTURES'
400 TAB_DSC_DEFINES_BUILD_TARGETS = 'BUILD_TARGETS'
401 TAB_DSC_DEFINES_SKUID_IDENTIFIER = 'SKUID_IDENTIFIER'
402 TAB_DSC_DEFINES_PCD_INFO_GENERATION = 'PCD_INFO_GENERATION'
403 TAB_DSC_DEFINES_PCD_VAR_CHECK_GENERATION = 'PCD_VAR_CHECK_GENERATION'
404 TAB_DSC_DEFINES_FLASH_DEFINITION = 'FLASH_DEFINITION'
405 TAB_DSC_DEFINES_BUILD_NUMBER = 'BUILD_NUMBER'
406 TAB_DSC_DEFINES_MAKEFILE_NAME = 'MAKEFILE_NAME'
407 TAB_DSC_DEFINES_BS_BASE_ADDRESS = 'BsBaseAddress'
408 TAB_DSC_DEFINES_RT_BASE_ADDRESS = 'RtBaseAddress'
409 TAB_DSC_DEFINES_RFC_LANGUAGES = 'RFC_LANGUAGES'
410 TAB_DSC_DEFINES_ISO_LANGUAGES = 'ISO_LANGUAGES'
411 TAB_DSC_DEFINES_DEFINE = 'DEFINE'
412 TAB_DSC_DEFINES_VPD_TOOL_GUID = 'VPD_TOOL_GUID'
413 TAB_FIX_LOAD_TOP_MEMORY_ADDRESS = 'FIX_LOAD_TOP_MEMORY_ADDRESS'
414 TAB_DSC_DEFINES_EDKGLOBAL = 'EDK_GLOBAL'
415 TAB_DSC_PREBUILD = 'PREBUILD'
416 TAB_DSC_POSTBUILD = 'POSTBUILD'
417 #
418 # TargetTxt Definitions
419 #
420 TAB_TAT_DEFINES_ACTIVE_PLATFORM = 'ACTIVE_PLATFORM'
421 TAB_TAT_DEFINES_ACTIVE_MODULE = 'ACTIVE_MODULE'
422 TAB_TAT_DEFINES_TOOL_CHAIN_CONF = 'TOOL_CHAIN_CONF'
423 TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER = 'MAX_CONCURRENT_THREAD_NUMBER'
424 TAB_TAT_DEFINES_TARGET = 'TARGET'
425 TAB_TAT_DEFINES_TOOL_CHAIN_TAG = 'TOOL_CHAIN_TAG'
426 TAB_TAT_DEFINES_TARGET_ARCH = 'TARGET_ARCH'
427 TAB_TAT_DEFINES_BUILD_RULE_CONF = "BUILD_RULE_CONF"
428
429 #
430 # ToolDef Definitions
431 #
432 TAB_TOD_DEFINES_TARGET = 'TARGET'
433 TAB_TOD_DEFINES_TOOL_CHAIN_TAG = 'TOOL_CHAIN_TAG'
434 TAB_TOD_DEFINES_TARGET_ARCH = 'TARGET_ARCH'
435 TAB_TOD_DEFINES_COMMAND_TYPE = 'COMMAND_TYPE'
436 TAB_TOD_DEFINES_FAMILY = 'FAMILY'
437 TAB_TOD_DEFINES_BUILDRULEFAMILY = 'BUILDRULEFAMILY'
438 TAB_TOD_DEFINES_BUILDRULEORDER = 'BUILDRULEORDER'
439
440 #
441 # Conditional Statements
442 #
443 TAB_IF = '!if'
444 TAB_END_IF = '!endif'
445 TAB_ELSE_IF = '!elseif'
446 TAB_ELSE = '!else'
447 TAB_IF_DEF = '!ifdef'
448 TAB_IF_N_DEF = '!ifndef'
449 TAB_IF_EXIST = '!if exist'
450 TAB_ERROR = '!ERROR'
451
452 #
453 # Unknown section
454 #
455 TAB_UNKNOWN = 'UNKNOWN'
456
457 #
458 # Build database path
459 #
460 DATABASE_PATH = ":memory:" #"BuildDatabase.db"
461
462 # used by ECC
463 MODIFIER_LIST = ['IN', 'OUT', 'OPTIONAL', 'UNALIGNED', 'EFI_RUNTIMESERVICE', 'EFI_BOOTSERVICE', 'EFIAPI']
464
465 # Dependency Expression
466 DEPEX_SUPPORTED_OPCODE = ["BEFORE", "AFTER", "PUSH", "AND", "OR", "NOT", "END", "SOR", "TRUE", "FALSE", '(', ')']
467
468 TAB_STATIC_LIBRARY = "STATIC-LIBRARY-FILE"
469 TAB_DYNAMIC_LIBRARY = "DYNAMIC-LIBRARY-FILE"
470 TAB_FRAMEWORK_IMAGE = "EFI-IMAGE-FILE"
471 TAB_C_CODE_FILE = "C-CODE-FILE"
472 TAB_C_HEADER_FILE = "C-HEADER-FILE"
473 TAB_UNICODE_FILE = "UNICODE-TEXT-FILE"
474 TAB_IMAGE_FILE = "IMAGE-DEFINITION-FILE"
475 TAB_DEPENDENCY_EXPRESSION_FILE = "DEPENDENCY-EXPRESSION-FILE"
476 TAB_UNKNOWN_FILE = "UNKNOWN-TYPE-FILE"
477 TAB_DEFAULT_BINARY_FILE = "_BINARY_FILE_"
478 TAB_OBJECT_FILE = "OBJECT-FILE"
479 TAB_VFR_FILE = 'VISUAL-FORM-REPRESENTATION-FILE'
480
481 # used by BRG
482 TAB_BRG_PCD = 'PCD'
483 TAB_BRG_LIBRARY = 'Library'
484
485 #
486 # Build Rule File Version Definition
487 #
488 TAB_BUILD_RULE_VERSION = "build_rule_version"
489
490 # section name for PCDs
491 PCDS_DYNAMIC_DEFAULT = "PcdsDynamicDefault"
492 PCDS_DYNAMIC_VPD = "PcdsDynamicVpd"
493 PCDS_DYNAMIC_HII = "PcdsDynamicHii"
494 PCDS_DYNAMICEX_DEFAULT = "PcdsDynamicExDefault"
495 PCDS_DYNAMICEX_VPD = "PcdsDynamicExVpd"
496 PCDS_DYNAMICEX_HII = "PcdsDynamicExHii"
497
498 SECTIONS_HAVE_ITEM_PCD = [PCDS_DYNAMIC_DEFAULT.upper(),PCDS_DYNAMIC_VPD.upper(),PCDS_DYNAMIC_HII.upper(), \
499 PCDS_DYNAMICEX_DEFAULT.upper(),PCDS_DYNAMICEX_VPD.upper(),PCDS_DYNAMICEX_HII.upper()]
500 # Section allowed to have items after arch
501 SECTIONS_HAVE_ITEM_AFTER_ARCH = [TAB_LIBRARY_CLASSES.upper(), TAB_DEPEX.upper(), TAB_USER_EXTENSIONS.upper(),
502 PCDS_DYNAMIC_DEFAULT.upper(),
503 PCDS_DYNAMIC_VPD.upper(),
504 PCDS_DYNAMIC_HII.upper(),
505 PCDS_DYNAMICEX_DEFAULT.upper(),
506 PCDS_DYNAMICEX_VPD.upper(),
507 PCDS_DYNAMICEX_HII.upper(),
508 TAB_BUILD_OPTIONS.upper(),
509 TAB_INCLUDES.upper()]