]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Revert previous check in. ECP is only supposed to support UEFI 2.0.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Nov 2008 07:43:45 +0000 (07:43 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Nov 2008 07:43:45 +0000 (07:43 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6450 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Event.c

index c4fd2afbbde39ee351b8460c09b9e102c66277c2..3cb668e9666560dbe31bc2d07bfedf6b91e9c37d 100644 (file)
@@ -190,6 +190,8 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
+\r
 static\r
 VOID\r
 EFIAPI\r
@@ -209,7 +211,7 @@ EventNotifySignalAllNullEvent (
   return;\r
 }\r
 \r
-\r
+#endif\r
 \r
 EFI_STATUS\r
 EFIAPI\r
@@ -243,50 +245,49 @@ Returns:
   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
@@ -323,48 +324,48 @@ Return:
   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