summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-11 07:43:45 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-11-11 07:43:45 +0000
commitdd4a462dcbcb9de5bb8a139212fef966417e39b8 (patch)
tree0c233fe7316110737aab28104a885ae35040c51c /EdkCompatibilityPkg/Foundation
parentc76a83cc63a66462516252a8d15d0e6d0b2150bc (diff)
downloadedk2-platforms-dd4a462dcbcb9de5bb8a139212fef966417e39b8.tar.xz
Revert previous check in. ECP is only supposed to support UEFI 2.0.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6450 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Event.c159
1 files changed, 80 insertions, 79 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Event.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Event.c
index c4fd2afbbd..3cb668e966 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Event.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Event.c
@@ -190,6 +190,8 @@ Returns:
return EFI_SUCCESS;
}
+#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
+
static
VOID
EFIAPI
@@ -209,7 +211,7 @@ EventNotifySignalAllNullEvent (
return;
}
-
+#endif
EFI_STATUS
EFIAPI
@@ -243,50 +245,49 @@ Returns:
UINT32 EventType;
EFI_EVENT_NOTIFY WorkerNotifyFunction;
- if (gST->Hdr.Revision < 0x00020000) {
-
- if (NotifyFunction == NULL) {
- EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;
- } else {
- EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT;
- }
- WorkerNotifyFunction = NotifyFunction;
-
- //
- // prior to UEFI 2.0 use Tiano extension to EFI
- //
- Status = gBS->CreateEvent (
- EventType,
- NotifyTpl,
- WorkerNotifyFunction,
- NotifyContext,
- LegacyBootEvent
- );
+#if (EFI_SPECIFICATION_VERSION < 0x00020000)
+
+ if (NotifyFunction == NULL) {
+ EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;
} else {
-
- EventType = EFI_EVENT_NOTIFY_SIGNAL;
- if (NotifyFunction == NULL) {
- //
- // CreatEventEx will check NotifyFunction is NULL or not
- //
- WorkerNotifyFunction = EventNotifySignalAllNullEvent;
- } else {
- WorkerNotifyFunction = NotifyFunction;
- }
-
+ EventType = EFI_EVENT_SIGNAL_LEGACY_BOOT;
+ }
+ WorkerNotifyFunction = NotifyFunction;
+
+ //
+ // prior to UEFI 2.0 use Tiano extension to EFI
+ //
+ Status = gBS->CreateEvent (
+ EventType,
+ NotifyTpl,
+ WorkerNotifyFunction,
+ NotifyContext,
+ LegacyBootEvent
+ );
+#else
+
+ EventType = EFI_EVENT_NOTIFY_SIGNAL;
+ if (NotifyFunction == NULL) {
//
- // For UEFI 2.0 and the future use an Event Group
+ // CreatEventEx will check NotifyFunction is NULL or not
//
- Status = gBS->CreateEventEx (
- EventType,
- NotifyTpl,
- WorkerNotifyFunction,
- NotifyContext,
- &gEfiEventLegacyBootGuid,
- LegacyBootEvent
- );
+ WorkerNotifyFunction = EventNotifySignalAllNullEvent;
+ } else {
+ WorkerNotifyFunction = NotifyFunction;
}
+ //
+ // For UEFI 2.0 and the future use an Event Group
+ //
+ Status = gBS->CreateEventEx (
+ EventType,
+ NotifyTpl,
+ WorkerNotifyFunction,
+ NotifyContext,
+ &gEfiEventLegacyBootGuid,
+ LegacyBootEvent
+ );
+#endif
return Status;
}
@@ -323,48 +324,48 @@ Return:
UINT32 EventType;
EFI_EVENT_NOTIFY WorkerNotifyFunction;
- if (gST->Hdr.Revision < 0x00020000) {
-
- if (NotifyFunction == NULL) {
- EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;
- } else {
- EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT;
- }
- WorkerNotifyFunction = NotifyFunction;
-
- //
- // prior to UEFI 2.0 use Tiano extension to EFI
- //
- Status = gBS->CreateEvent (
- EventType,
- NotifyTpl,
- WorkerNotifyFunction,
- NotifyContext,
- ReadyToBootEvent
- );
+#if (EFI_SPECIFICATION_VERSION < 0x00020000)
+
+ if (NotifyFunction == NULL) {
+ EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT | EFI_EVENT_NOTIFY_SIGNAL_ALL;
} else {
-
- EventType = EFI_EVENT_NOTIFY_SIGNAL;
- if (NotifyFunction == NULL) {
- //
- // CreatEventEx will check NotifyFunction is NULL or not
- //
- WorkerNotifyFunction = EventNotifySignalAllNullEvent;
- } else {
- WorkerNotifyFunction = NotifyFunction;
- }
-
+ EventType = EFI_EVENT_SIGNAL_READY_TO_BOOT;
+ }
+ WorkerNotifyFunction = NotifyFunction;
+
+ //
+ // prior to UEFI 2.0 use Tiano extension to EFI
+ //
+ Status = gBS->CreateEvent (
+ EventType,
+ NotifyTpl,
+ WorkerNotifyFunction,
+ NotifyContext,
+ ReadyToBootEvent
+ );
+#else
+
+ EventType = EFI_EVENT_NOTIFY_SIGNAL;
+ if (NotifyFunction == NULL) {
//
- // For UEFI 2.0 and the future use an Event Group
+ // CreatEventEx will check NotifyFunction is NULL or not
//
- Status = gBS->CreateEventEx (
- EventType,
- NotifyTpl,
- WorkerNotifyFunction,
- NotifyContext,
- &gEfiEventReadyToBootGuid,
- ReadyToBootEvent
- );
+ WorkerNotifyFunction = EventNotifySignalAllNullEvent;
+ } else {
+ WorkerNotifyFunction = NotifyFunction;
}
+
+ //
+ // For UEFI 2.0 and the future use an Event Group
+ //
+ Status = gBS->CreateEventEx (
+ EventType,
+ NotifyTpl,
+ WorkerNotifyFunction,
+ NotifyContext,
+ &gEfiEventReadyToBootGuid,
+ ReadyToBootEvent
+ );
+#endif
return Status;
}