xref: /DragonStub/lib/data.c (revision 530d68ba191850edafc6da22cb2df55bec0c5fa5)
1*530d68baSNigel Croxon /*++
2*530d68baSNigel Croxon 
3*530d68baSNigel Croxon Copyright (c) 1998  Intel Corporation
4*530d68baSNigel Croxon 
5*530d68baSNigel Croxon Module Name:
6*530d68baSNigel Croxon 
7*530d68baSNigel Croxon     data.c
8*530d68baSNigel Croxon 
9*530d68baSNigel Croxon Abstract:
10*530d68baSNigel Croxon 
11*530d68baSNigel Croxon     EFI library global data
12*530d68baSNigel Croxon 
13*530d68baSNigel Croxon 
14*530d68baSNigel Croxon 
15*530d68baSNigel Croxon Revision History
16*530d68baSNigel Croxon 
17*530d68baSNigel Croxon --*/
18*530d68baSNigel Croxon 
19*530d68baSNigel Croxon #include "lib.h"
20*530d68baSNigel Croxon 
21*530d68baSNigel Croxon //
22*530d68baSNigel Croxon // LibInitialized - TRUE once InitializeLib() is called for the first time
23*530d68baSNigel Croxon //
24*530d68baSNigel Croxon 
25*530d68baSNigel Croxon BOOLEAN  LibInitialized = FALSE;
26*530d68baSNigel Croxon 
27*530d68baSNigel Croxon //
28*530d68baSNigel Croxon // ST - pointer to the EFI system table
29*530d68baSNigel Croxon //
30*530d68baSNigel Croxon 
31*530d68baSNigel Croxon EFI_SYSTEM_TABLE        *ST;
32*530d68baSNigel Croxon 
33*530d68baSNigel Croxon //
34*530d68baSNigel Croxon // BS - pointer to the boot services table
35*530d68baSNigel Croxon //
36*530d68baSNigel Croxon 
37*530d68baSNigel Croxon EFI_BOOT_SERVICES       *BS;
38*530d68baSNigel Croxon 
39*530d68baSNigel Croxon 
40*530d68baSNigel Croxon //
41*530d68baSNigel Croxon // Default pool allocation type
42*530d68baSNigel Croxon //
43*530d68baSNigel Croxon 
44*530d68baSNigel Croxon EFI_MEMORY_TYPE PoolAllocationType = EfiBootServicesData;
45*530d68baSNigel Croxon 
46*530d68baSNigel Croxon //
47*530d68baSNigel Croxon // Unicode collation functions that are in use
48*530d68baSNigel Croxon //
49*530d68baSNigel Croxon 
50*530d68baSNigel Croxon EFI_UNICODE_COLLATION_INTERFACE   LibStubUnicodeInterface = {
51*530d68baSNigel Croxon     LibStubStriCmp,
52*530d68baSNigel Croxon     LibStubMetaiMatch,
53*530d68baSNigel Croxon     LibStubStrLwrUpr,
54*530d68baSNigel Croxon     LibStubStrLwrUpr,
55*530d68baSNigel Croxon     NULL,   // FatToStr
56*530d68baSNigel Croxon     NULL,   // StrToFat
57*530d68baSNigel Croxon     NULL    // SupportedLanguages
58*530d68baSNigel Croxon };
59*530d68baSNigel Croxon 
60*530d68baSNigel Croxon EFI_UNICODE_COLLATION_INTERFACE   *UnicodeInterface = &LibStubUnicodeInterface;
61*530d68baSNigel Croxon 
62*530d68baSNigel Croxon //
63*530d68baSNigel Croxon // Root device path
64*530d68baSNigel Croxon //
65*530d68baSNigel Croxon 
66*530d68baSNigel Croxon EFI_DEVICE_PATH RootDevicePath[] = {
67*530d68baSNigel Croxon    {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH,0}}
68*530d68baSNigel Croxon };
69*530d68baSNigel Croxon 
70*530d68baSNigel Croxon EFI_DEVICE_PATH EndDevicePath[] = {
71*530d68baSNigel Croxon    {END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}}
72*530d68baSNigel Croxon };
73*530d68baSNigel Croxon 
74*530d68baSNigel Croxon EFI_DEVICE_PATH EndInstanceDevicePath[] = {
75*530d68baSNigel Croxon    {END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, {END_DEVICE_PATH_LENGTH, 0}}
76*530d68baSNigel Croxon };
77*530d68baSNigel Croxon 
78*530d68baSNigel Croxon 
79*530d68baSNigel Croxon //
80*530d68baSNigel Croxon // EFI IDs
81*530d68baSNigel Croxon //
82*530d68baSNigel Croxon 
83*530d68baSNigel Croxon EFI_GUID EfiGlobalVariable  = EFI_GLOBAL_VARIABLE;
84*530d68baSNigel Croxon EFI_GUID NullGuid = { 0,0,0,{0,0,0,0,0,0,0,0} };
85*530d68baSNigel Croxon 
86*530d68baSNigel Croxon //
87*530d68baSNigel Croxon // Protocol IDs
88*530d68baSNigel Croxon //
89*530d68baSNigel Croxon 
90*530d68baSNigel Croxon EFI_GUID DevicePathProtocol       = DEVICE_PATH_PROTOCOL;
91*530d68baSNigel Croxon EFI_GUID LoadedImageProtocol      = LOADED_IMAGE_PROTOCOL;
92*530d68baSNigel Croxon EFI_GUID TextInProtocol           = SIMPLE_TEXT_INPUT_PROTOCOL;
93*530d68baSNigel Croxon EFI_GUID TextOutProtocol          = SIMPLE_TEXT_OUTPUT_PROTOCOL;
94*530d68baSNigel Croxon EFI_GUID BlockIoProtocol          = BLOCK_IO_PROTOCOL;
95*530d68baSNigel Croxon EFI_GUID DiskIoProtocol           = DISK_IO_PROTOCOL;
96*530d68baSNigel Croxon EFI_GUID FileSystemProtocol       = SIMPLE_FILE_SYSTEM_PROTOCOL;
97*530d68baSNigel Croxon EFI_GUID LoadFileProtocol         = LOAD_FILE_PROTOCOL;
98*530d68baSNigel Croxon EFI_GUID DeviceIoProtocol         = DEVICE_IO_PROTOCOL;
99*530d68baSNigel Croxon EFI_GUID UnicodeCollationProtocol = UNICODE_COLLATION_PROTOCOL;
100*530d68baSNigel Croxon EFI_GUID SerialIoProtocol         = SERIAL_IO_PROTOCOL;
101*530d68baSNigel Croxon EFI_GUID SimpleNetworkProtocol    = EFI_SIMPLE_NETWORK_PROTOCOL;
102*530d68baSNigel Croxon EFI_GUID PxeBaseCodeProtocol      = EFI_PXE_BASE_CODE_PROTOCOL;
103*530d68baSNigel Croxon EFI_GUID PxeCallbackProtocol      = EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL;
104*530d68baSNigel Croxon EFI_GUID NetworkInterfaceIdentifierProtocol = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
105*530d68baSNigel Croxon EFI_GUID UiProtocol               = EFI_UI_PROTOCOL;
106*530d68baSNigel Croxon EFI_GUID PciIoProtocol            = EFI_PCI_IO_PROTOCOL;
107*530d68baSNigel Croxon //
108*530d68baSNigel Croxon // File system information IDs
109*530d68baSNigel Croxon //
110*530d68baSNigel Croxon 
111*530d68baSNigel Croxon EFI_GUID GenericFileInfo           = EFI_FILE_INFO_ID;
112*530d68baSNigel Croxon EFI_GUID FileSystemInfo            = EFI_FILE_SYSTEM_INFO_ID;
113*530d68baSNigel Croxon EFI_GUID FileSystemVolumeLabelInfo = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID;
114*530d68baSNigel Croxon 
115*530d68baSNigel Croxon //
116*530d68baSNigel Croxon // Reference implementation public protocol IDs
117*530d68baSNigel Croxon //
118*530d68baSNigel Croxon 
119*530d68baSNigel Croxon EFI_GUID InternalShellProtocol = INTERNAL_SHELL_GUID;
120*530d68baSNigel Croxon EFI_GUID VariableStoreProtocol = VARIABLE_STORE_PROTOCOL;
121*530d68baSNigel Croxon EFI_GUID LegacyBootProtocol = LEGACY_BOOT_PROTOCOL;
122*530d68baSNigel Croxon EFI_GUID VgaClassProtocol = VGA_CLASS_DRIVER_PROTOCOL;
123*530d68baSNigel Croxon 
124*530d68baSNigel Croxon EFI_GUID TextOutSpliterProtocol = TEXT_OUT_SPLITER_PROTOCOL;
125*530d68baSNigel Croxon EFI_GUID ErrorOutSpliterProtocol = ERROR_OUT_SPLITER_PROTOCOL;
126*530d68baSNigel Croxon EFI_GUID TextInSpliterProtocol = TEXT_IN_SPLITER_PROTOCOL;
127*530d68baSNigel Croxon /* Added for GOP support */
128*530d68baSNigel Croxon EFI_GUID GraphicsOutputProtocol = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
129*530d68baSNigel Croxon 
130*530d68baSNigel Croxon EFI_GUID AdapterDebugProtocol = ADAPTER_DEBUG_PROTOCOL;
131*530d68baSNigel Croxon 
132*530d68baSNigel Croxon //
133*530d68baSNigel Croxon // Device path media protocol IDs
134*530d68baSNigel Croxon //
135*530d68baSNigel Croxon EFI_GUID PcAnsiProtocol = DEVICE_PATH_MESSAGING_PC_ANSI;
136*530d68baSNigel Croxon EFI_GUID Vt100Protocol  = DEVICE_PATH_MESSAGING_VT_100;
137*530d68baSNigel Croxon 
138*530d68baSNigel Croxon //
139*530d68baSNigel Croxon // EFI GPT Partition Type GUIDs
140*530d68baSNigel Croxon //
141*530d68baSNigel Croxon EFI_GUID EfiPartTypeSystemPartitionGuid = EFI_PART_TYPE_EFI_SYSTEM_PART_GUID;
142*530d68baSNigel Croxon EFI_GUID EfiPartTypeLegacyMbrGuid = EFI_PART_TYPE_LEGACY_MBR_GUID;
143*530d68baSNigel Croxon 
144*530d68baSNigel Croxon 
145*530d68baSNigel Croxon //
146*530d68baSNigel Croxon // Reference implementation Vendor Device Path Guids
147*530d68baSNigel Croxon //
148*530d68baSNigel Croxon EFI_GUID UnknownDevice      = UNKNOWN_DEVICE_GUID;
149*530d68baSNigel Croxon 
150*530d68baSNigel Croxon //
151*530d68baSNigel Croxon // Configuration Table GUIDs
152*530d68baSNigel Croxon //
153*530d68baSNigel Croxon 
154*530d68baSNigel Croxon EFI_GUID MpsTableGuid             = MPS_TABLE_GUID;
155*530d68baSNigel Croxon EFI_GUID AcpiTableGuid            = ACPI_TABLE_GUID;
156*530d68baSNigel Croxon EFI_GUID SMBIOSTableGuid          = SMBIOS_TABLE_GUID;
157*530d68baSNigel Croxon EFI_GUID SalSystemTableGuid       = SAL_SYSTEM_TABLE_GUID;
158*530d68baSNigel Croxon 
159*530d68baSNigel Croxon //
160*530d68baSNigel Croxon // Network protocol GUIDs
161*530d68baSNigel Croxon //
162*530d68baSNigel Croxon EFI_GUID Ip4ServiceBindingProtocol = EFI_IP4_SERVICE_BINDING_PROTOCOL;
163*530d68baSNigel Croxon EFI_GUID Ip4Protocol = EFI_IP4_PROTOCOL;
164*530d68baSNigel Croxon EFI_GUID Udp4ServiceBindingProtocol = EFI_UDP4_SERVICE_BINDING_PROTOCOL;
165*530d68baSNigel Croxon EFI_GUID Udp4Protocol = EFI_UDP4_PROTOCOL;
166*530d68baSNigel Croxon EFI_GUID Tcp4ServiceBindingProtocol = EFI_TCP4_SERVICE_BINDING_PROTOCOL;
167*530d68baSNigel Croxon EFI_GUID Tcp4Protocol = EFI_TCP4_PROTOCOL;
168*530d68baSNigel Croxon 
169*530d68baSNigel Croxon //
170*530d68baSNigel Croxon // Pointer protocol GUIDs
171*530d68baSNigel Croxon //
172*530d68baSNigel Croxon EFI_GUID SimplePointerProtocol    = EFI_SIMPLE_POINTER_PROTOCOL_GUID;
173*530d68baSNigel Croxon EFI_GUID AbsolutePointerProtocol  = EFI_ABSOLUTE_POINTER_PROTOCOL_GUID;
174*530d68baSNigel Croxon 
175