diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-16 23:28:02 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-16 23:28:02 +0000 |
commit | 54cd17e9842d82dae3cd78686e05c4dc37a3540d (patch) | |
tree | ca742c18c860275959591c69dcf45268451f3ae1 /MdeModulePkg/Core/Dxe | |
parent | f6079c7003bd2f20e6754e931fd24434a0be5c87 (diff) | |
download | edk2-platforms-54cd17e9842d82dae3cd78686e05c4dc37a3540d.tar.xz |
MdeModulePkg DXE Core: Add Idle event during BootServices WaitForEvent
Signal an Idle event during BootServices WaitForEvent.
Signed-off-by: jljusten
Reviewed-by: mdkinney
Reviewed-by: rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11841 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain.h | 17 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain.inf | 2 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Event/Event.c | 21 |
4 files changed, 39 insertions, 7 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index 79b895bcfa..09c7093518 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -26,7 +26,7 @@ Depex - Dependency Expresion.
SOR - Schedule On Request - Don't schedule if this bit is set.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -402,7 +402,7 @@ CoreTrust ( **/
VOID
EFIAPI
-EmptyFuntion (
+CoreEmptyCallbackFunction (
IN EFI_EVENT Event,
IN VOID *Context
)
@@ -450,7 +450,7 @@ CoreDispatcher ( Status = CoreCreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_NOTIFY,
- EmptyFuntion,
+ CoreEmptyCallbackFunction,
NULL,
&gEfiEventDxeDispatchGuid,
&DxeDispatchEvent
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index f5651026fa..dfd4980eac 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -63,6 +63,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Guid/EventLegacyBios.h>
#include <Guid/EventGroup.h>
#include <Guid/LoadModuleAtFixedAddress.h>
+#include <Guid/IdleLoopEvent.h>
#include <Library/DxeCoreEntryPoint.h>
#include <Library/DebugLib.h>
@@ -2459,4 +2460,20 @@ CoreReleaseLock ( IN EFI_LOCK *Lock
);
+
+/**
+ An empty function to pass error checking of CreateEventEx ().
+
+ @param Event Event whose notification function is being invoked.
+ @param Context Pointer to the notification function's context,
+ which is implementation-dependent.
+
+**/
+VOID
+EFIAPI
+CoreEmptyCallbackFunction (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ );
+
#endif
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index e00ee8d284..3170e37be8 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -107,7 +107,7 @@ gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID
gEfiEventDxeDispatchGuid ## CONSUMES ## GUID
gLoadFixedAddressConfigurationTableGuid ## SOMETIMES_CONSUMES
-
+ gIdleLoopEventGuid ## CONSUMES ## GUID
[Protocols]
gEfiStatusCodeRuntimeProtocolGuid ## SOMETIMES_CONSUMES
diff --git a/MdeModulePkg/Core/Dxe/Event/Event.c b/MdeModulePkg/Core/Dxe/Event/Event.c index 3d15c0c12b..d9fc7586a7 100644 --- a/MdeModulePkg/Core/Dxe/Event/Event.c +++ b/MdeModulePkg/Core/Dxe/Event/Event.c @@ -1,7 +1,7 @@ /** @file
UEFI Event support functions implemented in this file.
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -87,6 +87,11 @@ UINT32 mEventTable[] = { EVT_TIMER | EVT_NOTIFY_WAIT,
};
+///
+/// gIdleLoopEvent - Event which is signalled when the core is idle
+///
+EFI_EVENT gIdleLoopEvent = NULL;
+
/**
Enter critical section by acquiring the lock on gEventQueueLock.
@@ -134,6 +139,15 @@ CoreInitializeEventServices ( CoreInitializeTimer ();
+ CoreCreateEventEx (
+ EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
+ CoreEmptyCallbackFunction,
+ NULL,
+ &gIdleLoopEventGuid,
+ &gIdleLoopEvent
+ );
+
return EFI_SUCCESS;
}
@@ -630,9 +644,9 @@ CoreWaitForEvent ( }
//
- // This was the location of the Idle loop callback in EFI 1.x reference
- // code. We don't have that concept in this base at this point.
+ // Signal the Idle event
//
+ CoreSignalEvent (gIdleLoopEvent);
}
}
@@ -702,3 +716,4 @@ CoreCloseEvent ( return Status;
}
+
|