git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6450
6f19259b-4bc3-4df7-8a09-
765794883524
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
+\r
UINT32 EventType;\r
EFI_EVENT_NOTIFY WorkerNotifyFunction;\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_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
- \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
- // For UEFI 2.0 and the future use an Event Group\r
+ // CreatEventEx will check NotifyFunction is NULL or not\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
+ // 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
UINT32 EventType;\r
EFI_EVENT_NOTIFY WorkerNotifyFunction;\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
- \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
- // For UEFI 2.0 and the future use an Event Group\r
+ // CreatEventEx will check NotifyFunction is NULL or not\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
+ // 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