]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004 - 2007, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | \r | |
13 | Module Name:\r | |
14 | \r | |
15 | EdkIIGlueDxeDriverEntryPoint.c\r | |
16 | \r | |
17 | Abstract: \r | |
18 | \r | |
19 | DXE Driver entry point template file\r | |
20 | \r | |
21 | --*/\r | |
22 | \r | |
23 | #include "EdkIIGlueDxe.h"\r | |
24 | #include "Common/EdkIIGlueDependencies.h"\r | |
25 | \r | |
26 | STATIC EFI_EVENT _mDriverExitBootServicesNotifyEvent;\r | |
27 | \r | |
28 | //\r | |
29 | // Driver Model related definitions.\r | |
30 | // LIMITATION: only support one instance of Driver Model protocols per driver.\r | |
31 | // In case where multiple Driver Model protocols need to be installed in a single driver,\r | |
32 | // manually edit this file and compile/link the modified file with the driver.\r | |
33 | //\r | |
34 | \r | |
35 | #ifdef __EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__\r | |
36 | extern EFI_DRIVER_BINDING_PROTOCOL __EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__;\r | |
37 | #endif\r | |
38 | \r | |
39 | #ifdef __EDKII_GLUE_COMPONENT_NAME_PROTOCOL_INSTANCE__\r | |
40 | #if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r | |
41 | extern EFI_COMPONENT_NAME2_PROTOCOL __EDKII_GLUE_COMPONENT_NAME_PROTOCOL_INSTANCE__;\r | |
42 | #else\r | |
43 | extern EFI_COMPONENT_NAME_PROTOCOL __EDKII_GLUE_COMPONENT_NAME_PROTOCOL_INSTANCE__;\r | |
44 | #endif\r | |
45 | #endif\r | |
46 | \r | |
47 | #ifdef __EDKII_GLUE_DRIVER_CONFIGURATION_PROTOCOL_INSTANCE__\r | |
48 | extern EFI_DRIVER_CONFIGURATION_PROTOCOL __EDKII_GLUE_DRIVER_CONFIGURATION_PROTOCOL_INSTANCE__;\r | |
49 | #endif\r | |
50 | \r | |
51 | #ifdef __EDKII_GLUE_DRIVER_DIAGNOSTICS_PROTOCOL_INSTANCE__\r | |
52 | extern EFI_DRIVER_DIAGNOSTICS_PROTOCOL __EDKII_GLUE_DRIVER_DIAGNOSTICS_PROTOCOL_INSTANCE__;\r | |
53 | #endif\r | |
54 | \r | |
55 | GLOBAL_REMOVE_IF_UNREFERENCED const EFI_DRIVER_MODEL_PROTOCOL_LIST _gDriverModelProtocolList[] = {\r | |
56 | {\r | |
57 | #ifdef __EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__\r | |
58 | &__EDKII_GLUE_DRIVER_BINDING_PROTOCOL_INSTANCE__,\r | |
59 | #else\r | |
60 | NULL,\r | |
61 | #endif\r | |
62 | \r | |
63 | #ifdef __EDKII_GLUE_COMPONENT_NAME_PROTOCOL_INSTANCE__\r | |
64 | &__EDKII_GLUE_COMPONENT_NAME_PROTOCOL_INSTANCE__,\r | |
65 | #else\r | |
66 | NULL,\r | |
67 | #endif\r | |
68 | \r | |
69 | #ifdef __EDKII_GLUE_DRIVER_CONFIGURATION_PROTOCOL_INSTANCE__\r | |
70 | &__EDKII_GLUE_DRIVER_CONFIGURATION_PROTOCOL_INSTANCE__,\r | |
71 | #else\r | |
72 | NULL,\r | |
73 | #endif\r | |
74 | \r | |
75 | #ifdef __EDKII_GLUE_DRIVER_DIAGNOSTICS_PROTOCOL_INSTANCE__\r | |
76 | &__EDKII_GLUE_DRIVER_DIAGNOSTICS_PROTOCOL_INSTANCE__,\r | |
77 | #else\r | |
78 | NULL,\r | |
79 | #endif\r | |
80 | }\r | |
81 | };\r | |
82 | \r | |
83 | //\r | |
84 | // NOTE: Limitation:\r | |
85 | // Only one handler for SetVirtualAddressMap Event and ExitBootServices Event each\r | |
86 | //\r | |
87 | #ifdef __EDKII_GLUE_SET_VIRTUAL_ADDRESS_MAP_EVENT_HANDLER__\r | |
88 | VOID\r | |
89 | __EDKII_GLUE_SET_VIRTUAL_ADDRESS_MAP_EVENT_HANDLER__ (\r | |
90 | IN EFI_EVENT Event,\r | |
91 | IN VOID *Context\r | |
92 | );\r | |
93 | #endif\r | |
94 | \r | |
95 | GLOBAL_REMOVE_IF_UNREFERENCED const EFI_EVENT_NOTIFY _gDriverSetVirtualAddressMapEvent[] = {\r | |
96 | #ifdef __EDKII_GLUE_SET_VIRTUAL_ADDRESS_MAP_EVENT_HANDLER__\r | |
97 | __EDKII_GLUE_SET_VIRTUAL_ADDRESS_MAP_EVENT_HANDLER__,\r | |
98 | #endif\r | |
99 | NULL\r | |
100 | };\r | |
101 | \r | |
102 | #ifdef __EDKII_GLUE_EXIT_BOOT_SERVICES_EVENT_HANDLER__\r | |
103 | VOID\r | |
104 | __EDKII_GLUE_EXIT_BOOT_SERVICES_EVENT_HANDLER__ (\r | |
105 | IN EFI_EVENT Event,\r | |
106 | IN VOID *Context\r | |
107 | );\r | |
108 | #endif\r | |
109 | \r | |
110 | /**\r | |
111 | Set AtRuntime flag as TRUE after ExitBootServices\r | |
112 | \r | |
113 | @param[in] Event The Event that is being processed\r | |
114 | @param[in] Context Event Context\r | |
115 | **/\r | |
116 | VOID\r | |
117 | EFIAPI\r | |
118 | RuntimeDriverExitBootServices (\r | |
119 | IN EFI_EVENT Event,\r | |
120 | IN VOID *Context\r | |
121 | );\r | |
122 | \r | |
123 | GLOBAL_REMOVE_IF_UNREFERENCED const EFI_EVENT_NOTIFY _gDriverExitBootServicesEvent[] = {\r | |
124 | #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__ \r | |
125 | //\r | |
126 | // only Runtime drivers need to link EdkDxeRuntimeDriverLib\r | |
127 | //\r | |
128 | RuntimeDriverExitBootServices,\r | |
129 | #endif\r | |
130 | #ifdef __EDKII_GLUE_EXIT_BOOT_SERVICES_EVENT_HANDLER__\r | |
131 | __EDKII_GLUE_EXIT_BOOT_SERVICES_EVENT_HANDLER__,\r | |
132 | #endif\r | |
133 | NULL\r | |
134 | };\r | |
135 | \r | |
136 | \r | |
137 | //\r | |
138 | // Module Unload Handler\r | |
139 | //\r | |
140 | \r | |
141 | #ifdef __EDKII_GLUE_MODULE_UNLOAD_HANDLER__\r | |
142 | EFI_STATUS\r | |
143 | EFIAPI\r | |
144 | __EDKII_GLUE_MODULE_UNLOAD_HANDLER__ (\r | |
145 | EFI_HANDLE ImageHandle\r | |
146 | );\r | |
147 | #endif\r | |
148 | \r | |
149 | EFI_STATUS\r | |
150 | EFIAPI\r | |
151 | ProcessModuleUnloadList (\r | |
152 | EFI_HANDLE ImageHandle\r | |
153 | )\r | |
154 | {\r | |
155 | #ifdef __EDKII_GLUE_MODULE_UNLOAD_HANDLER__\r | |
156 | return (__EDKII_GLUE_MODULE_UNLOAD_HANDLER__ (ImageHandle));\r | |
157 | #else\r | |
158 | return EFI_SUCCESS;\r | |
159 | #endif\r | |
160 | }\r | |
161 | \r | |
162 | #ifdef __EDKII_GLUE_EFI_CALLER_ID_GUID__\r | |
163 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiCallerIdGuid = __EDKII_GLUE_EFI_CALLER_ID_GUID__;\r | |
164 | #endif\r | |
165 | \r | |
166 | //\r | |
167 | // Library constructors\r | |
168 | //\r | |
169 | VOID\r | |
170 | ProcessLibraryConstructorList (\r | |
171 | IN EFI_HANDLE ImageHandle,\r | |
172 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
173 | )\r | |
174 | {\r | |
175 | //\r | |
176 | // Declare "Status" if any of the following libraries are used\r | |
177 | //\r | |
178 | #if defined(__EDKII_GLUE_DXE_HOB_LIB__) \\r | |
179 | || defined(__EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__) \\r | |
180 | || defined(__EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__) \\r | |
181 | || defined(__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__) \\r | |
182 | || defined(__EDKII_GLUE_DXE_SERVICES_TABLE_LIB__) \\r | |
183 | || defined(__EDKII_GLUE_DXE_SMBUS_LIB__) \\r | |
184 | || defined(__EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__) \\r | |
185 | || defined(__EDKII_GLUE_EDK_DXE_SAL_LIB__) \\r | |
186 | || defined(__EDKII_GLUE_DXE_IO_LIB_CPU_IO__)\r | |
187 | EFI_STATUS Status;\r | |
188 | #endif\r | |
189 | \r | |
190 | //\r | |
191 | // EdkII Glue Library Constructors: \r | |
192 | // NOTE: the constructors must be called according to dependency order\r | |
193 | //\r | |
194 | // UefiBootServicesTableLib UefiBootServicesTableLibConstructor()\r | |
195 | // DxeIoLibCpuIo IoLibConstructor()\r | |
196 | // DxeSalLib DxeSalLibConstructor(), IPF only\r | |
197 | // EdkDxeRuntimeDriverLib RuntimeDriverLibConstruct()\r | |
198 | // DxeHobLib HobLibConstructor()\r | |
199 | // UefiDriverModelLib UefiDriverModelLibConstructor()\r | |
200 | // DxeSmbusLib SmbusLibConstructor() \r | |
201 | // DxeServicesTableLib DxeServicesTableLibConstructor()\r | |
202 | // UefiRuntimeServicesTableLib UefiRuntimeServicesTableLibConstructor() \r | |
203 | // \r | |
204 | \r | |
205 | #ifdef __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__\r | |
206 | Status = UefiBootServicesTableLibConstructor (ImageHandle, SystemTable);\r | |
207 | ASSERT_EFI_ERROR (Status);\r | |
208 | #endif\r | |
209 | \r | |
210 | #ifdef __EDKII_GLUE_DXE_IO_LIB_CPU_IO__\r | |
211 | Status = IoLibConstructor (ImageHandle, SystemTable);\r | |
212 | ASSERT_EFI_ERROR (Status);\r | |
213 | #endif\r | |
214 | \r | |
215 | #ifdef __EDKII_GLUE_EDK_DXE_SAL_LIB__\r | |
216 | Status = DxeSalLibConstructor(ImageHandle, SystemTable);\r | |
217 | ASSERT_EFI_ERROR (Status);\r | |
218 | #endif\r | |
219 | \r | |
220 | #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__\r | |
221 | Status = RuntimeDriverLibConstruct (ImageHandle, SystemTable);\r | |
222 | ASSERT_EFI_ERROR (Status);\r | |
223 | #endif\r | |
224 | \r | |
225 | #ifdef __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__\r | |
226 | Status = UefiRuntimeServicesTableLibConstructor (ImageHandle, SystemTable);\r | |
227 | ASSERT_EFI_ERROR (Status);\r | |
228 | #endif\r | |
229 | \r | |
230 | #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__\r | |
231 | Status = UefiDriverModelLibConstructor (ImageHandle, SystemTable);\r | |
232 | ASSERT_EFI_ERROR (Status);\r | |
233 | #endif\r | |
234 | \r | |
235 | #ifdef __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__\r | |
236 | Status = DxeServicesTableLibConstructor (ImageHandle, SystemTable);\r | |
237 | ASSERT_EFI_ERROR (Status); \r | |
238 | #endif\r | |
239 | \r | |
240 | #ifdef __EDKII_GLUE_DXE_HOB_LIB__\r | |
241 | Status = HobLibConstructor (ImageHandle, SystemTable);\r | |
242 | ASSERT_EFI_ERROR (Status);\r | |
243 | #endif\r | |
244 | \r | |
245 | #ifdef __EDKII_GLUE_DXE_SMBUS_LIB__\r | |
246 | Status = SmbusLibConstructor (ImageHandle, SystemTable);\r | |
247 | ASSERT_EFI_ERROR (Status);\r | |
248 | #endif\r | |
249 | \r | |
250 | }\r | |
251 | \r | |
252 | //\r | |
253 | // Library Destructors\r | |
254 | //\r | |
255 | VOID\r | |
256 | ProcessLibraryDestructorList (\r | |
257 | IN EFI_HANDLE ImageHandle,\r | |
258 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
259 | )\r | |
260 | {\r | |
261 | #if defined (__EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__) || defined (__EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__)\r | |
262 | EFI_STATUS Status; \r | |
263 | #endif\r | |
264 | \r | |
265 | //\r | |
266 | // NOTE: the destructors must be called according to dependency order\r | |
267 | //\r | |
268 | #ifdef __EDKII_GLUE_UEFI_DRIVER_MODEL_LIB__\r | |
269 | Status = UefiDriverModelLibDestructor (ImageHandle, SystemTable);\r | |
270 | ASSERT_EFI_ERROR (Status);\r | |
271 | #endif\r | |
272 | \r | |
273 | #ifdef __EDKII_GLUE_EDK_DXE_RUNTIME_DRIVER_LIB__\r | |
274 | Status = RuntimeDriverLibDeconstruct (ImageHandle, SystemTable);\r | |
275 | ASSERT_EFI_ERROR (Status);\r | |
276 | #endif\r | |
277 | }\r | |
278 | \r | |
279 | \r | |
280 | /**\r | |
281 | Unload function that is registered in the LoadImage protocol. It un-installs\r | |
282 | protocols produced and deallocates pool used by the driver. Called by the core\r | |
283 | when unloading the driver.\r | |
284 | \r | |
285 | @param ImageHandle\r | |
286 | \r | |
287 | @retval EFI_SUCCESS\r | |
288 | \r | |
289 | **/\r | |
290 | EFI_STATUS\r | |
291 | EFIAPI\r | |
292 | _DriverUnloadHandler (\r | |
293 | EFI_HANDLE ImageHandle\r | |
294 | )\r | |
295 | {\r | |
296 | EFI_STATUS Status;\r | |
297 | \r | |
298 | //\r | |
299 | // If an UnloadImage() handler is specified, then call it\r | |
300 | //\r | |
301 | Status = ProcessModuleUnloadList (ImageHandle);\r | |
302 | \r | |
303 | //\r | |
304 | // If the driver specific unload handler does not return an error, then call all of the\r | |
305 | // library destructors. If the unload handler returned an error, then the driver can not be\r | |
306 | // unloaded, and the library destructors should not be called\r | |
307 | //\r | |
308 | if (!EFI_ERROR (Status)) {\r | |
309 | //\r | |
310 | // Close our ExitBootServices () notify function\r | |
311 | //\r | |
312 | if (_gDriverExitBootServicesEvent[0] != NULL) {\r | |
313 | ASSERT (gBS != NULL);\r | |
314 | Status = gBS->CloseEvent (_mDriverExitBootServicesNotifyEvent);\r | |
315 | ASSERT_EFI_ERROR (Status);\r | |
316 | }\r | |
317 | \r | |
318 | //\r | |
319 | // NOTE: To allow passing in gST here, any library instance having a destructor\r | |
320 | // must depend on EfiDriverLib\r | |
321 | //\r | |
322 | ProcessLibraryDestructorList (ImageHandle, gST);\r | |
323 | }\r | |
324 | \r | |
325 | //\r | |
326 | // Return the status from the driver specific unload handler\r | |
327 | //\r | |
328 | return Status;\r | |
329 | }\r | |
330 | \r | |
331 | VOID\r | |
332 | EFIAPI\r | |
333 | _DriverExitBootServices (\r | |
334 | IN EFI_EVENT Event,\r | |
335 | IN VOID *Context\r | |
336 | )\r | |
337 | /*++\r | |
338 | \r | |
339 | Routine Description:\r | |
340 | \r | |
341 | Set AtRuntime flag as TRUE after ExitBootServices\r | |
342 | \r | |
343 | Arguments:\r | |
344 | \r | |
345 | Event - The Event that is being processed\r | |
346 | \r | |
347 | Context - Event Context\r | |
348 | \r | |
349 | Returns: \r | |
350 | \r | |
351 | None\r | |
352 | \r | |
353 | --*/\r | |
354 | {\r | |
355 | EFI_EVENT_NOTIFY ChildNotifyEventHandler;\r | |
356 | UINTN Index;\r | |
357 | \r | |
358 | for (Index = 0; _gDriverExitBootServicesEvent[Index] != NULL; Index++) {\r | |
359 | ChildNotifyEventHandler = _gDriverExitBootServicesEvent[Index];\r | |
360 | ChildNotifyEventHandler (Event, NULL);\r | |
361 | }\r | |
362 | }\r | |
363 | \r | |
364 | EFI_DRIVER_ENTRY_POINT (_ModuleEntryPoint);\r | |
365 | \r | |
366 | //\r | |
367 | // Module Entry Point\r | |
368 | //\r | |
369 | #ifdef __EDKII_GLUE_MODULE_ENTRY_POINT__\r | |
370 | EFI_STATUS\r | |
371 | EFIAPI\r | |
372 | __EDKII_GLUE_MODULE_ENTRY_POINT__ (\r | |
373 | EFI_HANDLE ImageHandle,\r | |
374 | EFI_SYSTEM_TABLE *SystemTable\r | |
375 | );\r | |
376 | #endif\r | |
377 | \r | |
378 | /**\r | |
379 | Enrty point to DXE Driver.\r | |
380 | \r | |
381 | @param ImageHandle ImageHandle of the loaded driver.\r | |
382 | @param SystemTable Pointer to the EFI System Table.\r | |
383 | \r | |
384 | @retval EFI_SUCCESS One or more of the drivers returned a success code.\r | |
385 | @retval !EFI_SUCESS The return status from the last driver entry point in the list.\r | |
386 | \r | |
387 | **/\r | |
388 | EFI_STATUS\r | |
389 | EFIAPI\r | |
390 | _ModuleEntryPoint (\r | |
391 | IN EFI_HANDLE ImageHandle,\r | |
392 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
393 | )\r | |
394 | {\r | |
395 | EFI_STATUS Status;\r | |
396 | EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;\r | |
397 | \r | |
398 | // if (_gUefiDriverRevision != 0) {\r | |
399 | // //\r | |
400 | // // Make sure that the EFI/UEFI spec revision of the platform is >= EFI/UEFI spec revision of the driver\r | |
401 | // //\r | |
402 | // if (SystemTable->Hdr.Revision < _gUefiDriverRevision) {\r | |
403 | // return EFI_INCOMPATIBLE_VERSION;\r | |
404 | // }\r | |
405 | // }\r | |
406 | \r | |
407 | // DEBUG ((EFI_D_ERROR, "EdkII Glue Driver Entry - 0\n"));\r | |
408 | \r | |
409 | //\r | |
410 | // Call constructor for all libraries\r | |
411 | //\r | |
412 | ProcessLibraryConstructorList (ImageHandle, SystemTable);\r | |
413 | \r | |
414 | //\r | |
415 | // Register our ExitBootServices () notify function\r | |
416 | //\r | |
417 | if (_gDriverExitBootServicesEvent[0] != NULL) {\r | |
418 | Status = SystemTable->BootServices->CreateEvent (\r | |
419 | EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,\r | |
420 | EFI_TPL_NOTIFY,\r | |
421 | _DriverExitBootServices,\r | |
422 | NULL,\r | |
423 | &_mDriverExitBootServicesNotifyEvent\r | |
424 | );\r | |
425 | \r | |
426 | ASSERT_EFI_ERROR (Status);\r | |
427 | }\r | |
428 | \r | |
429 | //\r | |
430 | // Install unload handler...\r | |
431 | //\r | |
432 | Status = SystemTable->BootServices->HandleProtocol (\r | |
433 | ImageHandle,\r | |
434 | &gEfiLoadedImageProtocolGuid,\r | |
435 | (VOID **)&LoadedImage\r | |
436 | );\r | |
437 | ASSERT_EFI_ERROR (Status);\r | |
438 | LoadedImage->Unload = _DriverUnloadHandler;\r | |
439 | \r | |
440 | //\r | |
441 | // Call the driver entry point\r | |
442 | //\r | |
443 | #ifdef __EDKII_GLUE_MODULE_ENTRY_POINT__\r | |
444 | Status = (__EDKII_GLUE_MODULE_ENTRY_POINT__ (ImageHandle, SystemTable));\r | |
445 | #else\r | |
446 | Status = EFI_SUCCESS;\r | |
447 | #endif\r | |
448 | \r | |
449 | //\r | |
450 | // If all of the drivers returned errors, then invoke all of the library destructors\r | |
451 | //\r | |
452 | if (EFI_ERROR (Status)) {\r | |
453 | //\r | |
454 | // Close our ExitBootServices () notify function\r | |
455 | //\r | |
456 | if (_gDriverExitBootServicesEvent[0] != NULL) {\r | |
457 | EFI_STATUS CloseEventStatus;\r | |
458 | CloseEventStatus = SystemTable->BootServices->CloseEvent (_mDriverExitBootServicesNotifyEvent);\r | |
459 | ASSERT_EFI_ERROR (CloseEventStatus);\r | |
460 | }\r | |
461 | \r | |
462 | ProcessLibraryDestructorList (ImageHandle, SystemTable);\r | |
463 | }\r | |
464 | \r | |
465 | //\r | |
466 | // Return the cummalative return status code from all of the driver entry points\r | |
467 | //\r | |
468 | return Status;\r | |
469 | }\r | |
470 | \r | |
471 | \r | |
472 | /**\r | |
473 | Enrty point wrapper of DXE Driver.\r | |
474 | \r | |
475 | @param ImageHandle ImageHandle of the loaded driver.\r | |
476 | @param SystemTable Pointer to the EFI System Table.\r | |
477 | \r | |
478 | @retval EFI_SUCCESS One or more of the drivers returned a success code.\r | |
479 | @retval !EFI_SUCESS The return status from the last driver entry point in the list.\r | |
480 | \r | |
481 | EBC build envrionment has /D $(IMAGE_ENTRY_POINT)=EfiMain which overrides what GlueLib \r | |
482 | defines: /D IMAGE_ENTRY_POINT=_ModuleEntryPoint, so _ModuleEntryPoint will be replaced with\r | |
483 | EfiMain thus the function below isn't needed in EBC envrionment.\r | |
484 | \r | |
485 | **/\r | |
486 | #ifndef MDE_CPU_EBC\r | |
487 | EFI_STATUS\r | |
488 | EFIAPI\r | |
489 | EfiMain (\r | |
490 | IN EFI_HANDLE ImageHandle,\r | |
491 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
492 | )\r | |
493 | {\r | |
494 | return _ModuleEntryPoint (ImageHandle, SystemTable);\r | |
495 | }\r | |
496 | #endif\r | |
497 | \r | |
498 | //\r | |
499 | // Guids not present in R8.6 code base\r | |
500 | //\r | |
501 | \r | |
502 | //\r | |
503 | // Protocol/Arch Protocol GUID globals\r | |
504 | //\r | |
505 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gUefiDriverConfigurationProtocolGuid = { 0xbfd7dc1d, 0x24f1, 0x40d9, { 0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } };\r | |
506 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gUefiDriverDiagnosticsProtocolGuid = { 0x4d330321, 0x025f, 0x4aac, { 0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } };\r | |
507 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiArpProtocolGuid = { 0xf4b427bb, 0xba21, 0x4f16, { 0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c } };\r | |
508 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiArpServiceBindingProtocolGuid = { 0xf44c00ee, 0x1f2c, 0x4a00, { 0xaa, 0x09, 0x1c, 0x9f, 0x3e, 0x08, 0x00, 0xa3 } };\r | |
509 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDhcp4ProtocolGuid = { 0x8a219718, 0x4ef5, 0x4761, { 0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56 } };\r | |
510 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid = { 0x9d9a39d8, 0xbd42, 0x4a73, { 0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80 } };\r | |
511 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ProtocolGuid = { 0x41d94cd2, 0x35b6, 0x455a, { 0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } };\r | |
512 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ServiceBindingProtocolGuid = { 0xc51711e7, 0xb4bf, 0x404a, { 0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4 } };\r | |
513 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIp4ConfigProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } };\r | |
514 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkProtocolGuid = { 0x3b95aa31, 0x3793, 0x434b, { 0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } };\r | |
515 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid = { 0xf36ff770, 0xa7e1, 0x42cf, { 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c } };\r | |
516 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ProtocolGuid = { 0x3ad9df29, 0x4501, 0x478d, { 0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } };\r | |
517 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid = { 0x2FE800BE, 0x8F01, 0x4aa6, { 0x94, 0x6B, 0xD7, 0x13, 0x88, 0xE1, 0x83, 0x3F } };\r | |
518 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiTcp4ProtocolGuid = { 0x65530BC7, 0xA359, 0x410f, { 0xB0, 0x10, 0x5A, 0xAD, 0xC7, 0xEC, 0x2B, 0x62 } }; \r | |
519 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiTcp4ServiceBindingProtocolGuid = { 0x00720665, 0x67EB, 0x4a99, { 0xBA, 0xF7, 0xD3, 0xC3, 0x3A, 0x1C, 0x7C, 0xC9 } };\r | |
520 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiUdp4ProtocolGuid = { 0x3ad9df29, 0x4501, 0x478d, { 0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } };\r | |
521 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiUdp4ServiceBindingProtocolGuid = { 0x83f01464, 0x99bd, 0x45e5, { 0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6 } };\r | |
522 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiAuthenticationInfoProtocolGuid = { 0x7671d9d0, 0x53db, 0x4173, { 0xaa, 0x69, 0x23, 0x27, 0xf2, 0x1f, 0x0b, 0xc7 } };\r | |
523 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDevicePathFromTextProtocolGuid = { 0x5c99a21, 0xc70f, 0x4ad2, { 0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } };\r | |
524 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDevicePathToTextProtocolGuid = { 0x8b843e20, 0x8132, 0x4852, { 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } };\r | |
525 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiDevicePathUtilitiesProtocolGuid = { 0x379be4e, 0xd706, 0x437d, { 0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4 } };\r | |
526 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashProtocolGuid = { 0xc5184932, 0xdba5, 0x46db, { 0xa5, 0xba, 0xcc, 0x0b, 0xda, 0x9c, 0x14, 0x35 } };\r | |
527 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashServiceBindingProtocolGuid = { 0x42881c98, 0xa4f3, 0x44b0, { 0xa3, 0x9d, 0xdf, 0xa1, 0x86, 0x67, 0xd8, 0xcd } };\r | |
528 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiIScsiInitiatorNameProtocolGuid = { 0xa6a72875, 0x2962, 0x4c18, { 0x9f, 0x46, 0x8d, 0xa6, 0x44, 0xcc, 0xfe, 0x00 } };\r | |
529 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiExtScsiPassThruProtocolGuid = { 0x1d3de7f0, 0x0807, 0x424f, { 0xaa, 0x69, 0x11, 0xa5, 0x4e, 0x19, 0xa4, 0x6f } };\r | |
530 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiTapeIoProtocolGuid = { 0x1e93e633, 0xd65a, 0x459e, { 0xab, 0x84, 0x93, 0xd9, 0xec, 0x26, 0x6d, 0x18 } };\r | |
531 | #if (EFI_SPECIFICATION_VERSION < 0x00020000)\r | |
532 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiUsb2HcProtocolGuid = { 0x3e745226, 0x9818, 0x45b6, { 0xa2, 0xac, 0xd7, 0xcd, 0x0e, 0x8b, 0xa2, 0xbc } };\r | |
533 | #endif\r | |
534 | \r | |
535 | //\r | |
536 | // PPI GUID globals\r | |
537 | //\r | |
538 | \r | |
539 | //\r | |
540 | // GUID globals\r | |
541 | //\r | |
542 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHobMemoryAllocBspStoreGuid = { 0x564b33cd, 0xc92a, 0x4593, { 0x90, 0xbf, 0x24, 0x73, 0xe4, 0x3c, 0x63, 0x22 } };\r | |
543 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHobMemoryAllocStackGuid = { 0x4ed4bf27, 0x4092, 0x42e9, { 0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x00, 0xc9, 0xbd } }; \r | |
544 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHobMemoryAllocModuleGuid = { 0xf8e21975, 0x0899, 0x4f58, { 0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a } }; \r | |
545 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiAuthenticationChapRadiusGuid = { 0xd6062b50, 0x15ca, 0x11da, { 0x92, 0x19, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } };\r | |
546 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiAuthenticationChapLocalGuid = { 0xc280c73e, 0x15ca, 0x11da, { 0xb0, 0xca, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } };\r | |
547 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha1Guid = { 0x2ae9d80f, 0x3fb2, 0x4095, { 0xb7, 0xb1, 0xe9, 0x31, 0x57, 0xb9, 0x46, 0xb6 } };\r | |
548 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha224Guid = { 0x8df01a06, 0x9bd5, 0x4bf7, { 0xb0, 0x21, 0xdb, 0x4f, 0xd9, 0xcc, 0xf4, 0x5b } }; \r | |
549 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha256Guid = { 0x51aa59de, 0xfdf2, 0x4ea3, { 0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } };\r | |
550 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha384Guid = { 0xefa96432, 0xde33, 0x4dd2, { 0xae, 0xe6, 0x32, 0x8c, 0x33, 0xdf, 0x77, 0x7a } }; \r | |
551 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmSha512Guid = { 0xcaa4381e, 0x750c, 0x4770, { 0xb8, 0x70, 0x7a, 0x23, 0xb4, 0xe4, 0x21, 0x30 } }; \r | |
552 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiHashAlgorithmMD5Guid = { 0xaf7c79c, 0x65b5, 0x4319, { 0xb0, 0xae, 0x44, 0xec, 0x48, 0x4e, 0x4a, 0xd7 } };\r | |
553 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gBootObjectAuthorizationParmsetGuid = { 0xedd35e31, 0x7b9, 0x11d2, { 0x83, 0xa3, 0x00, 0xa0, 0xc9, 0x1f, 0xad, 0xcf } };\r | |
554 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gSmmCommunicateHeaderGuid = { 0xf328e36c, 0x23b6, 0x4a95, { 0x85, 0x4b, 0x32, 0xe1, 0x95, 0x34, 0xcd, 0x75 } };\r | |
555 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiCapsuleGuid = { 0x3B6686BD, 0x0D76, 0x4030, { 0xB7, 0x0E, 0xB5, 0x51, 0x9E, 0x2F, 0xC5, 0xA0 } };\r | |
556 | GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiConfigFileNameGuid = { 0x98B8D59B, 0xE8BA, 0x48EE, { 0x98, 0xDD, 0xC2, 0x95, 0x39, 0x2F, 0x1E, 0xDB } };\r |