mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
f6079c7003
commit
54cd17e984
|
@ -26,7 +26,7 @@
|
||||||
Depex - Dependency Expresion.
|
Depex - Dependency Expresion.
|
||||||
SOR - Schedule On Request - Don't schedule if this bit is set.
|
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -402,7 +402,7 @@ CoreTrust (
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
EmptyFuntion (
|
CoreEmptyCallbackFunction (
|
||||||
IN EFI_EVENT Event,
|
IN EFI_EVENT Event,
|
||||||
IN VOID *Context
|
IN VOID *Context
|
||||||
)
|
)
|
||||||
|
@ -450,7 +450,7 @@ CoreDispatcher (
|
||||||
Status = CoreCreateEventEx (
|
Status = CoreCreateEventEx (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_NOTIFY_SIGNAL,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
EmptyFuntion,
|
CoreEmptyCallbackFunction,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventDxeDispatchGuid,
|
&gEfiEventDxeDispatchGuid,
|
||||||
&DxeDispatchEvent
|
&DxeDispatchEvent
|
||||||
|
|
|
@ -63,6 +63,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Guid/EventLegacyBios.h>
|
#include <Guid/EventLegacyBios.h>
|
||||||
#include <Guid/EventGroup.h>
|
#include <Guid/EventGroup.h>
|
||||||
#include <Guid/LoadModuleAtFixedAddress.h>
|
#include <Guid/LoadModuleAtFixedAddress.h>
|
||||||
|
#include <Guid/IdleLoopEvent.h>
|
||||||
|
|
||||||
#include <Library/DxeCoreEntryPoint.h>
|
#include <Library/DxeCoreEntryPoint.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
|
@ -2459,4 +2460,20 @@ CoreReleaseLock (
|
||||||
IN EFI_LOCK *Lock
|
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
|
#endif
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID
|
gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID
|
||||||
gEfiEventDxeDispatchGuid ## CONSUMES ## GUID
|
gEfiEventDxeDispatchGuid ## CONSUMES ## GUID
|
||||||
gLoadFixedAddressConfigurationTableGuid ## SOMETIMES_CONSUMES
|
gLoadFixedAddressConfigurationTableGuid ## SOMETIMES_CONSUMES
|
||||||
|
gIdleLoopEventGuid ## CONSUMES ## GUID
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiStatusCodeRuntimeProtocolGuid ## SOMETIMES_CONSUMES
|
gEfiStatusCodeRuntimeProtocolGuid ## SOMETIMES_CONSUMES
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
UEFI Event support functions implemented in this 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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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,
|
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.
|
Enter critical section by acquiring the lock on gEventQueueLock.
|
||||||
|
@ -134,6 +139,15 @@ CoreInitializeEventServices (
|
||||||
|
|
||||||
CoreInitializeTimer ();
|
CoreInitializeTimer ();
|
||||||
|
|
||||||
|
CoreCreateEventEx (
|
||||||
|
EVT_NOTIFY_SIGNAL,
|
||||||
|
TPL_NOTIFY,
|
||||||
|
CoreEmptyCallbackFunction,
|
||||||
|
NULL,
|
||||||
|
&gIdleLoopEventGuid,
|
||||||
|
&gIdleLoopEvent
|
||||||
|
);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -630,9 +644,9 @@ CoreWaitForEvent (
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// This was the location of the Idle loop callback in EFI 1.x reference
|
// Signal the Idle event
|
||||||
// code. We don't have that concept in this base at this point.
|
|
||||||
//
|
//
|
||||||
|
CoreSignalEvent (gIdleLoopEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,3 +716,4 @@ CoreCloseEvent (
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/** @file
|
||||||
|
GUID is the name of events used with CreateEventEx in order to be notified
|
||||||
|
when the DXE Core is idle.
|
||||||
|
|
||||||
|
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
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef __IDLE_LOOP_EVENT_GUID_H__
|
||||||
|
#define __IDLE_LOOP_EVENT_GUID_H__
|
||||||
|
|
||||||
|
#define IDLE_LOOP_EVENT_GUID \
|
||||||
|
{ 0x3c8d294c, 0x5fc3, 0x4451, { 0xbb, 0x31, 0xc4, 0xc0, 0x32, 0x29, 0x5e, 0x6c } }
|
||||||
|
|
||||||
|
extern EFI_GUID gIdleLoopEventGuid;
|
||||||
|
|
||||||
|
#endif
|
|
@ -169,6 +169,10 @@
|
||||||
# Include/Guid/DebugMask.h
|
# Include/Guid/DebugMask.h
|
||||||
gEfiGenericVariableGuid = { 0x59d1c24f, 0x50f1, 0x401a, {0xb1, 0x01, 0xf3, 0x3e, 0x0d, 0xae, 0xd4, 0x43} }
|
gEfiGenericVariableGuid = { 0x59d1c24f, 0x50f1, 0x401a, {0xb1, 0x01, 0xf3, 0x3e, 0x0d, 0xae, 0xd4, 0x43} }
|
||||||
|
|
||||||
|
## Event for the DXE Core to signal idle events
|
||||||
|
# Include/Guid/EventIdle.h
|
||||||
|
gIdleLoopEventGuid = { 0x3c8d294c, 0x5fc3, 0x4451, { 0xbb, 0x31, 0xc4, 0xc0, 0x32, 0x29, 0x5e, 0x6c } }
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
## Load File protocol provides capability to load and unload EFI image into memory and execute it.
|
## Load File protocol provides capability to load and unload EFI image into memory and execute it.
|
||||||
# Include/Protocol/LoadPe32Image.h
|
# Include/Protocol/LoadPe32Image.h
|
||||||
|
|
Loading…
Reference in New Issue