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