Sync EDKII BaseTools to BaseTools project r1903.
[efi/edk2/.git] / edk2 / BaseTools / Source / Python / Eot / EotGlobalData.py
1 ## @file\r
2 # This file is used to save global datas\r
3 #\r
4 # Copyright (c) 2008 - 2010, Intel Corporation\r
5 # All rights reserved. This program and the accompanying materials\r
6 # are licensed and made available under the terms and conditions of the BSD License\r
7 # which accompanies this distribution.  The full text of the license may be found at\r
8 # http://opensource.org/licenses/bsd-license.php\r
9 #\r
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12 #\r
13 \r
14 from Common.Misc import sdict\r
15 \r
16 gEFI_SOURCE = ''\r
17 gEDK_SOURCE = ''\r
18 gWORKSPACE = ''\r
19 gSHELL_INF = 'Application\Shell'\r
20 gMAKE_FILE = ''\r
21 gDSC_FILE = ''\r
22 gFV_FILE = []\r
23 gFV = []\r
24 gMAP_FILE = []\r
25 gMap = {}\r
26 \r
27 \r
28 gDb = ''\r
29 gIdentifierTableList = []\r
30 \r
31 # Global macro\r
32 gMACRO = {}\r
33 gMACRO['EFI_SOURCE'] = gEFI_SOURCE\r
34 gMACRO['EDK_SOURCE'] = gEDK_SOURCE\r
35 gMACRO['SHELL_INF'] = gSHELL_INF\r
36 gMACRO['CAPSULE_INF'] = ''\r
37 \r
38 gNOT_FOUND_FILES = []\r
39 gSOURCE_FILES = []\r
40 gINF_FILES = {}\r
41 gDEC_FILES = []\r
42 \r
43 # Log file for unmatched variables\r
44 gUN_MATCHED_LOG = 'Log_UnMatched.log'\r
45 gOP_UN_MATCHED = open(gUN_MATCHED_LOG, 'w+')\r
46 \r
47 # Log file for all INF files\r
48 gINF_FILES = 'Log_Inf_File.log'\r
49 gOP_INF = open(gINF_FILES, 'w+')\r
50 \r
51 # Log file for not dispatched PEIM/DRIVER\r
52 gUN_DISPATCHED_LOG = 'Log_UnDispatched.log'\r
53 gOP_UN_DISPATCHED = open(gUN_DISPATCHED_LOG, 'w+')\r
54 \r
55 # Log file for unmatched variables in function calling\r
56 gUN_MATCHED_IN_LIBRARY_CALLING_LOG = 'Log_UnMatchedInLibraryCalling.log'\r
57 gOP_UN_MATCHED_IN_LIBRARY_CALLING = open(gUN_MATCHED_IN_LIBRARY_CALLING_LOG, 'w+')\r
58 \r
59 # Log file for order of dispatched PEIM/DRIVER\r
60 gDISPATCH_ORDER_LOG = 'Log_DispatchOrder.log'\r
61 gOP_DISPATCH_ORDER = open(gDISPATCH_ORDER_LOG, 'w+')\r
62 \r
63 # Log file for source files not found\r
64 gUN_FOUND_FILES = 'Log_UnFoundSourceFiles.log'\r
65 gOP_UN_FOUND_FILES = open(gUN_FOUND_FILES, 'w+')\r
66 \r
67 # Log file for found source files\r
68 gSOURCE_FILES = 'Log_SourceFiles.log'\r
69 gOP_SOURCE_FILES = open(gSOURCE_FILES, 'w+')\r
70 \r
71 # Dict for GUID found in DEC files\r
72 gGuidDict = sdict()\r
73 \r
74 # Dict for hard coded GUID Macros\r
75 # {GuidName : [GuidMacro : GuidValue]}\r
76 gGuidMacroDict = sdict()\r
77 \r
78 # Dict for PPI\r
79 gPpiList = {}\r
80 \r
81 # Dict for PROTOCOL\r
82 gProtocolList = {}\r
83 \r
84 # Dict for consumed PPI function calling\r
85 gConsumedPpiLibrary = sdict()\r
86 gConsumedPpiLibrary['EfiCommonLocateInterface'] = 0\r
87 gConsumedPpiLibrary['PeiServicesLocatePpi'] = 0\r
88 \r
89 # Dict for produced PROTOCOL function calling\r
90 gProducedProtocolLibrary = sdict()\r
91 gProducedProtocolLibrary['RegisterEsalClass'] = 0\r
92 gProducedProtocolLibrary['CoreInstallProtocolInterface'] = 1\r
93 gProducedProtocolLibrary['CoreInstallMultipleProtocolInterfaces'] = -1\r
94 gProducedProtocolLibrary['EfiInstallProtocolInterface'] = 1\r
95 gProducedProtocolLibrary['EfiReinstallProtocolInterface'] = 1\r
96 gProducedProtocolLibrary['EfiLibNamedEventSignal'] = 0\r
97 gProducedProtocolLibrary['LibInstallProtocolInterfaces'] = 1\r
98 gProducedProtocolLibrary['LibReinstallProtocolInterfaces'] = 1\r
99 \r
100 # Dict for consumed PROTOCOL function calling\r
101 gConsumedProtocolLibrary = sdict()\r
102 gConsumedProtocolLibrary['EfiHandleProtocol'] = 0\r
103 gConsumedProtocolLibrary['EfiLocateProtocolHandleBuffers'] = 0\r
104 gConsumedProtocolLibrary['EfiLocateProtocolInterface'] = 0\r
105 gConsumedProtocolLibrary['EfiHandleProtocol'] = 1\r
106 \r
107 # Dict for callback PROTOCOL function callling\r
108 gCallbackProtocolLibrary = sdict()\r
109 gCallbackProtocolLibrary['EfiRegisterProtocolCallback'] = 2\r
110 \r
111 # Dict for ARCH PROTOCOL\r
112 gArchProtocols = ['gEfiBdsArchProtocolGuid',\r
113                   'gEfiCapsuleArchProtocolGuid',\r
114                   'gEfiCpuArchProtocolGuid',  #5053697e-2cbc-4819-90d9-0580deee5754\r
115                   'gEfiMetronomeArchProtocolGuid',\r
116                   'gEfiMonotonicCounterArchProtocolGuid',\r
117                   'gEfiRealTimeClockArchProtocolGuid',\r
118                   'gEfiResetArchProtocolGuid',\r
119                   'gEfiRuntimeArchProtocolGuid',\r
120                   'gEfiSecurityArchProtocolGuid',\r
121                   'gEfiStatusCodeRuntimeProtocolGuid',\r
122                   'gEfiTimerArchProtocolGuid',\r
123                   'gEfiVariableArchProtocolGuid',\r
124                   'gEfiVariableWriteArchProtocolGuid',\r
125                   'gEfiWatchdogTimerArchProtocolGuid']\r
126 gArchProtocolGuids = ['665e3ff6-46cc-11d4-9a38-0090273fc14d',\r
127                       '26baccb1-6f42-11d4-bce7-0080c73c8881',\r
128                       '26baccb2-6f42-11d4-bce7-0080c73c8881',\r
129                       '1da97072-bddc-4b30-99f1-72a0b56fff2a',\r
130                       '27cfac87-46cc-11d4-9a38-0090273fc14d',\r
131                       '27cfac88-46cc-11d4-9a38-0090273fc14d',\r
132                       'b7dfb4e1-052f-449f-87be-9818fc91b733',\r
133                       'a46423e3-4617-49f1-b9ff-d1bfa9115839',\r
134                       'd2b2b828-0826-48a7-b3df-983c006024f0',\r
135                       '26baccb3-6f42-11d4-bce7-0080c73c8881',\r
136                       '1e5668e2-8481-11d4-bcf1-0080c73c8881',\r
137                       '6441f818-6362-4e44-b570-7dba31dd2453',\r
138                       '665e3ff5-46cc-11d4-9a38-0090273fc14d']\r