return EFI_SUCCESS;\r
}\r
\r
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
+\r
static\r
VOID\r
EFIAPI\r
return;\r
}\r
\r
-\r
+#endif\r
\r
EFI_STATUS\r
EFIAPI\r
UINT32 EventType;\r
EFI_EVENT_NOTIFY WorkerNotifyFunction;\r
\r
- if (gST->Hdr.Revision < 0x00020000) {\r
- \r
- if (NotifyFunction == NULL) {\r
- EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;\r
- } else {\r
- EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT;\r
- }\r
- WorkerNotifyFunction = NotifyFunction;\r
- \r
- //\r
- // prior to UEFI 2.0 use Tiano extension to EFI\r
- //\r
- Status = gBS->CreateEvent (\r
- EventType,\r
- NotifyTpl,\r
- WorkerNotifyFunction,\r
- NotifyContext,\r
- LegacyBootEvent\r
- );\r
+#if (EFI_SPECIFICATION_VERSION < 0x00020000)\r
+\r
+ if (NotifyFunction == NULL) {\r
+ EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;\r
} else {\r
- \r
- EventType = EFI_EVENT_NOTIFY_SIGNAL;\r
- if (NotifyFunction == NULL) {\r
- //\r
- // CreatEventEx will check NotifyFunction is NULL or not\r
- //\r
- WorkerNotifyFunction = EventNotifySignalAllNullEvent;\r
- } else {\r
- WorkerNotifyFunction = NotifyFunction;\r
- }\r
- \r
+ EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT;\r
+ }\r
+ WorkerNotifyFunction = NotifyFunction;\r
+\r
+ //\r
+ // prior to UEFI 2.0 use Tiano extension to EFI\r
+ //\r
+ Status = gBS->CreateEvent (\r
+ EventType,\r
+ NotifyTpl,\r
+ WorkerNotifyFunction,\r
+ NotifyContext,\r
+ LegacyBootEvent\r
+ );\r
+#else\r
+\r
+ EventType = EFI_EVENT_NOTIFY_SIGNAL;\r
+ if (NotifyFunction == NULL) {\r
//\r
- // For UEFI 2.0 and the future use an Event Group\r
+ // CreatEventEx will check NotifyFunction is NULL or not\r
//\r
- Status = gBS->CreateEventEx (\r
- EventType,\r
- NotifyTpl,\r
- WorkerNotifyFunction,\r
- NotifyContext,\r
- &gEfiEventLegacyBootGuid,\r
- LegacyBootEvent\r
- );\r
+ WorkerNotifyFunction = EventNotifySignalAllNullEvent;\r
+ } else {\r
+ WorkerNotifyFunction = NotifyFunction;\r
}\r
\r
+ //\r
+ // For UEFI 2.0 and the future use an Event Group\r
+ //\r
+ Status = gBS->CreateEventEx (\r
+ EventType,\r
+ NotifyTpl,\r
+ WorkerNotifyFunction,\r
+ NotifyContext,\r
+ &gEfiEventLegacyBootGuid,\r
+ LegacyBootEvent\r
+ );\r
+#endif\r
return Status;\r
}\r
\r
UINT32 EventType;\r
EFI_EVENT_NOTIFY WorkerNotifyFunction;\r
\r
- if (gST->Hdr.Revision < 0x00020000) {\r
- \r
- if (NotifyFunction == NULL) {\r
- EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;\r
- } else {\r
- EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT;\r
- }\r
- WorkerNotifyFunction = NotifyFunction;\r
- \r
- //\r
- // prior to UEFI 2.0 use Tiano extension to EFI\r
- //\r
- Status = gBS->CreateEvent (\r
- EventType,\r
- NotifyTpl,\r
- WorkerNotifyFunction,\r
- NotifyContext,\r
- ReadyToBootEvent\r
- );\r
+#if (EFI_SPECIFICATION_VERSION < 0x00020000)\r
+\r
+ if (NotifyFunction == NULL) {\r
+ EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;\r
} else {\r
- \r
- EventType = EFI_EVENT_NOTIFY_SIGNAL;\r
- if (NotifyFunction == NULL) {\r
- //\r
- // CreatEventEx will check NotifyFunction is NULL or not\r
- //\r
- WorkerNotifyFunction = EventNotifySignalAllNullEvent;\r
- } else {\r
- WorkerNotifyFunction = NotifyFunction;\r
- }\r
- \r
+ EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT;\r
+ }\r
+ WorkerNotifyFunction = NotifyFunction;\r
+\r
+ //\r
+ // prior to UEFI 2.0 use Tiano extension to EFI\r
+ //\r
+ Status = gBS->CreateEvent (\r
+ EventType,\r
+ NotifyTpl,\r
+ WorkerNotifyFunction,\r
+ NotifyContext,\r
+ ReadyToBootEvent\r
+ );\r
+#else\r
+\r
+ EventType = EFI_EVENT_NOTIFY_SIGNAL;\r
+ if (NotifyFunction == NULL) {\r
//\r
- // For UEFI 2.0 and the future use an Event Group\r
+ // CreatEventEx will check NotifyFunction is NULL or not\r
//\r
- Status = gBS->CreateEventEx (\r
- EventType,\r
- NotifyTpl,\r
- WorkerNotifyFunction,\r
- NotifyContext,\r
- &gEfiEventReadyToBootGuid,\r
- ReadyToBootEvent\r
- );\r
+ WorkerNotifyFunction = EventNotifySignalAllNullEvent;\r
+ } else {\r
+ WorkerNotifyFunction = NotifyFunction;\r
}\r
+\r
+ //\r
+ // For UEFI 2.0 and the future use an Event Group\r
+ //\r
+ Status = gBS->CreateEventEx (\r
+ EventType,\r
+ NotifyTpl,\r
+ WorkerNotifyFunction,\r
+ NotifyContext,\r
+ &gEfiEventReadyToBootGuid,\r
+ ReadyToBootEvent\r
+ );\r
+#endif\r
return Status;\r
}\r