Depex - Dependency Expresion.\r
SOR - Schedule On Request - Don't schedule if this bit is set.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
EFI_FV_FILETYPE mDxeFileTypes[] = {\r
EFI_FV_FILETYPE_DRIVER,\r
+ EFI_FV_FILETYPE_COMBINED_SMM_DXE,\r
EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER,\r
EFI_FV_FILETYPE_DXE_CORE,\r
EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE\r
}\r
\r
\r
+/**\r
+ An empty function to pass error checking of CreateEventEx ().\r
+\r
+ @param Event Event whose notification function is being invoked.\r
+ @param Context Pointer to the notification function's context,\r
+ which is implementation-dependent.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+EmptyFuntion (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ )\r
+{\r
+ return;\r
+}\r
\r
/**\r
This is the main Dispatcher for DXE and it exits when there are no more\r
LIST_ENTRY *Link;\r
EFI_CORE_DRIVER_ENTRY *DriverEntry;\r
BOOLEAN ReadyToRun;\r
+ EFI_EVENT DxeDispatchEvent;\r
+ \r
\r
if (gDispatcherRunning) {\r
//\r
\r
gDispatcherRunning = TRUE;\r
\r
+ Status = CoreCreateEventEx (\r
+ EVT_NOTIFY_SIGNAL,\r
+ TPL_NOTIFY,\r
+ EmptyFuntion,\r
+ NULL,\r
+ &gEfiEventDxeDispatchGuid,\r
+ &DxeDispatchEvent\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
\r
ReturnStatus = EFI_NOT_FOUND;\r
do {\r
}\r
}\r
}\r
+\r
+ //\r
+ // Now DXE Dispatcher finished one round of dispatch, signal an event group\r
+ // so that SMM Dispatcher get chance to dispatch SMM Drivers which depend\r
+ // on UEFI protocols\r
+ //\r
+ if (!EFI_ERROR (ReturnStatus)) {\r
+ CoreSignalEvent (DxeDispatchEvent);\r
+ }\r
} while (ReadyToRun);\r
\r
+ //\r
+ // Close DXE dispatch Event\r
+ //\r
+ CoreCloseEvent (DxeDispatchEvent);\r
+\r
gDispatcherRunning = FALSE;\r
\r
return ReturnStatus;\r