\r
--*/\r
{\r
- EFI_GUID *GuidPtr;\r
- EFI_EVENT_NOTIFY Function;\r
-\r
- GuidPtr = NULL;\r
- Function = NotifyFunction;\r
-\r
- //\r
- // Convert EFI 1.10 Events to their UEFI 2.0 CreateEventEx mapping\r
- //\r
- if (Type == EVT_SIGNAL_EXIT_BOOT_SERVICES) {\r
- GuidPtr = &gEfiEventExitBootServicesGuid;\r
- } else if (Type == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {\r
- GuidPtr = &gEfiEventVirtualAddressChangeGuid;\r
- }\r
-\r
- return CoreCreateEventEx (Type, NotifyTpl, Function, NotifyContext, GuidPtr, Event);\r
+ return CoreCreateEventEx (Type, NotifyTpl, NotifyFunction, NotifyContext, NULL, Event);\r
}\r
\r
\r
NotifyFunction - Pointer to the events notification function\r
NotifyContext - Pointer to the notification functions context; corresponds to\r
parameter "Context" in the notification function\r
- EventGrout - GUID for EventGroup if NULL act the same as gBS->CreateEvent().\r
+ EventGroup - GUID for EventGroup if NULL act the same as gBS->CreateEvent().\r
Event - Pointer to the newly created event if the call succeeds; undefined otherwise\r
\r
Returns:\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ //\r
+ // Convert Event type for pre-defined Event groups\r
+ //\r
+ if (EventGroup != NULL) {\r
+ //\r
+ // For event group, type EVT_SIGNAL_EXIT_BOOT_SERVICES and EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE\r
+ // are not valid\r
+ //\r
+ if ((Type == EVT_SIGNAL_EXIT_BOOT_SERVICES) || (Type == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+ if (CompareGuid (EventGroup, &gEfiEventExitBootServicesGuid)) {\r
+ Type = EVT_SIGNAL_EXIT_BOOT_SERVICES;\r
+ } else if (CompareGuid (EventGroup, &gEfiEventVirtualAddressChangeGuid)) {\r
+ Type = EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE;\r
+ }\r
+ } else {\r
+ //\r
+ // Convert EFI 1.10 Events to their UEFI 2.0 CreateEventEx mapping\r
+ //\r
+ if (Type == EVT_SIGNAL_EXIT_BOOT_SERVICES) {\r
+ EventGroup = &gEfiEventExitBootServicesGuid;\r
+ } else if (Type == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {\r
+ EventGroup = &gEfiEventVirtualAddressChangeGuid;\r
+ }\r
+ }\r
+\r
//\r
// If it's a notify type of event, check its parameters\r
//\r