Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.

Changed old event definitions reference to these new event definitions.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2729 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-06-25 08:54:54 +00:00
parent a197b1ad17
commit 93b0fbc8a1
88 changed files with 2046 additions and 2039 deletions

View File

@@ -30,30 +30,30 @@ UINT32 mEventTable[] = {
// 0x80000200 Timer event with a notification function that is
// queue when the event is signaled with SignalEvent()
//
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_SIGNAL,
EVT_TIMER | EVT_NOTIFY_SIGNAL,
//
// 0x80000000 Timer event without a notification function. It can be
// signaled with SignalEvent() and checked with CheckEvent() or WaitForEvent().
//
EFI_EVENT_TIMER,
EVT_TIMER,
//
// 0x00000100 Generic event with a notification function that
// can be waited on with CheckEvent() or WaitForEvent()
//
EFI_EVENT_NOTIFY_WAIT,
EVT_NOTIFY_WAIT,
//
// 0x00000200 Generic event with a notification function that
// is queue when the event is signaled with SignalEvent()
//
EFI_EVENT_NOTIFY_SIGNAL,
EVT_NOTIFY_SIGNAL,
//
// 0x00000201 ExitBootServicesEvent.
//
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
EVT_SIGNAL_EXIT_BOOT_SERVICES,
//
// 0x60000202 SetVirtualAddressMapEvent.
//
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
//
// 0x00000000 Generic event without a notification function.
@@ -65,7 +65,7 @@ UINT32 mEventTable[] = {
// 0x80000100 Timer event with a notification function that can be
// waited on with CheckEvent() or WaitForEvent()
//
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_WAIT,
EVT_TIMER | EVT_NOTIFY_WAIT,
};
STATIC
@@ -139,7 +139,7 @@ Returns:
{
UINTN Index;
for (Index=0; Index <= EFI_TPL_HIGH_LEVEL; Index++) {
for (Index=0; Index <= TPL_HIGH_LEVEL; Index++) {
InitializeListHead (&gEventQueue[Index]);
}
@@ -190,7 +190,7 @@ Returns:
// Only clear the SIGNAL status if it is a SIGNAL type event.
// WAIT type events are only cleared in CheckEvent()
//
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
if (Event->Type & EVT_NOTIFY_SIGNAL) {
Event->SignalCount = 0;
}
@@ -332,9 +332,9 @@ Returns:
//
// Convert EFI 1.10 Events to thier UEFI 2.0 CreateEventEx mapping
//
if (Type == EVENT_SIGNAL_EXIT_BOOT_SERVICES) {
if (Type == EVT_SIGNAL_EXIT_BOOT_SERVICES) {
GuidPtr = &gEfiEventExitBootServicesGuid;
} else if (Type == EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
} else if (Type == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
GuidPtr = &gEfiEventVirtualAddressChangeGuid;
}
@@ -378,7 +378,7 @@ Returns:
INTN Index;
if ((Event == NULL) || (NotifyTpl == EFI_TPL_APPLICATION)) {
if ((Event == NULL) || (NotifyTpl == TPL_APPLICATION)) {
return EFI_INVALID_PARAMETER;
}
@@ -399,13 +399,13 @@ Returns:
//
// If it's a notify type of event, check its parameters
//
if ((Type & (EFI_EVENT_NOTIFY_WAIT | EFI_EVENT_NOTIFY_SIGNAL))) {
if ((Type & (EVT_NOTIFY_WAIT | EVT_NOTIFY_SIGNAL))) {
//
// Check for an invalid NotifyFunction or NotifyTpl
//
if ((NotifyFunction == NULL) ||
(NotifyTpl < EFI_TPL_APPLICATION) ||
(NotifyTpl >= EFI_TPL_HIGH_LEVEL)) {
(NotifyTpl < TPL_APPLICATION) ||
(NotifyTpl >= TPL_HIGH_LEVEL)) {
return EFI_INVALID_PARAMETER;
}
@@ -422,7 +422,7 @@ Returns:
// Allcoate and initialize a new event structure.
//
Status = CoreAllocatePool (
(Type & EFI_EVENT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
(Type & EVT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
sizeof (IEVENT),
(VOID **)&IEvent
);
@@ -445,7 +445,7 @@ Returns:
*Event = IEvent;
if (Type & EFI_EVENT_RUNTIME) {
if (Type & EVT_RUNTIME) {
//
// Keep a list of all RT events so we can tell the RT AP.
//
@@ -459,7 +459,7 @@ Returns:
CoreAcquireEventLock ();
if ((Type & EFI_EVENT_NOTIFY_SIGNAL) != 0x00000000) {
if ((Type & EVT_NOTIFY_SIGNAL) != 0x00000000) {
//
// The Event's NotifyFunction must be queued whenever the event is signaled
//
@@ -523,7 +523,7 @@ Returns:
//
// If signalling type is a notify function, queue it
//
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
if (Event->Type & EVT_NOTIFY_SIGNAL) {
if (Event->ExFlag) {
//
// The CreateEventEx() style requires all members of the Event Group
@@ -580,13 +580,13 @@ Returns:
return EFI_INVALID_PARAMETER;
}
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
if (Event->Type & EVT_NOTIFY_SIGNAL) {
return EFI_INVALID_PARAMETER;
}
Status = EFI_NOT_READY;
if (!Event->SignalCount && (Event->Type & EFI_EVENT_NOTIFY_WAIT)) {
if (!Event->SignalCount && (Event->Type & EVT_NOTIFY_WAIT)) {
//
// Queue the wait notify function
@@ -654,7 +654,7 @@ Returns:
//
// Can only WaitForEvent at TPL_APPLICATION
//
if (gEfiCurrentTpl != EFI_TPL_APPLICATION) {
if (gEfiCurrentTpl != TPL_APPLICATION) {
return EFI_UNSUPPORTED;
}
@@ -721,7 +721,7 @@ Returns:
//
// If it's a timer event, make sure it's not pending
//
if (Event->Type & EFI_EVENT_TIMER) {
if (Event->Type & EVT_TIMER) {
CoreSetTimer (Event, TimerCancel, 0);
}

View File

@@ -28,19 +28,19 @@ Revision History
//
// gTpl - Task priority level
//
EFI_TPL gEfiCurrentTpl = EFI_TPL_APPLICATION;
EFI_TPL gEfiCurrentTpl = TPL_APPLICATION;
//
// gEventQueueLock - Protects the event queus
//
EFI_LOCK gEventQueueLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL);
EFI_LOCK gEventQueueLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL);
//
// gEventQueue - A list of event's to notify for each priority level
// gEventPending - A bitmask of the EventQueues that are pending
//
LIST_ENTRY gEventQueue[EFI_TPL_HIGH_LEVEL + 1];
LIST_ENTRY gEventQueue[TPL_HIGH_LEVEL + 1];
UINTN gEventPending = 0;

View File

@@ -1,16 +1,16 @@
/*++
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Copyright (c) 2006, Intel Corporation
All rights reserved. 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.
Module Name:
timer.c
Abstract:
@@ -52,10 +52,10 @@ CoreInsertEventTimer (
//
static LIST_ENTRY mEfiTimerList = INITIALIZE_LIST_HEAD_VARIABLE (mEfiTimerList);
static EFI_LOCK mEfiTimerLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL - 1);
static EFI_LOCK mEfiTimerLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL - 1);
static EFI_EVENT mEfiCheckTimerEvent;
static EFI_LOCK mEfiSystemTimeLock = EFI_INITIALIZE_LOCK_VARIABLE (EFI_TPL_HIGH_LEVEL);
static EFI_LOCK mEfiSystemTimeLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL);
static UINT64 mEfiSystemTime = 0;
//
@@ -75,7 +75,7 @@ Routine Description:
Arguments:
None
Returns:
None
@@ -85,8 +85,8 @@ Returns:
EFI_STATUS Status;
Status = CoreCreateEvent (
EFI_EVENT_NOTIFY_SIGNAL,
EFI_TPL_HIGH_LEVEL - 1,
EVT_NOTIFY_SIGNAL,
TPL_HIGH_LEVEL - 1,
CoreCheckTimers,
NULL,
&mEfiCheckTimerEvent
@@ -108,7 +108,7 @@ Routine Description:
Arguments:
None
Returns:
Returns the current system time
@@ -137,7 +137,7 @@ Routine Description:
Arguments:
Duration - The number of 100ns elasped since the last call to TimerTick
Returns:
None
@@ -331,16 +331,16 @@ Arguments:
UserEvent - The timer event that is to be signaled at the specified time
Type - The type of time that is specified in TriggerTime
TriggerTime - The number of 100ns units until the timer expires
Returns:
EFI_SUCCESS - The event has been set to be signaled at the requested time
EFI_INVALID_PARAMETER - Event or Type is not valid
--*/
--*/
{
IEVENT *Event;
Event = UserEvent;
if (Event == NULL) {
@@ -351,10 +351,10 @@ Returns:
return EFI_INVALID_PARAMETER;
}
if (Type < 0 || Type > TimerRelative || !(Event->Type & EFI_EVENT_TIMER)) {
if (Type < 0 || Type > TimerRelative || !(Event->Type & EVT_TIMER)) {
return EFI_INVALID_PARAMETER;
}
CoreAcquireLock (&mEfiTimerLock);
//

View File

@@ -118,7 +118,7 @@ Returns:
//
// If raising to high level, disable interrupts
//
if (NewTpl >= EFI_TPL_HIGH_LEVEL && OldTpl < EFI_TPL_HIGH_LEVEL) {
if (NewTpl >= TPL_HIGH_LEVEL && OldTpl < TPL_HIGH_LEVEL) {
CoreSetInterruptState (FALSE);
}
@@ -165,8 +165,8 @@ Returns:
// interrupts are enabled
//
if (OldTpl >= EFI_TPL_HIGH_LEVEL && NewTpl < EFI_TPL_HIGH_LEVEL) {
gEfiCurrentTpl = EFI_TPL_HIGH_LEVEL;
if (OldTpl >= TPL_HIGH_LEVEL && NewTpl < TPL_HIGH_LEVEL) {
gEfiCurrentTpl = TPL_HIGH_LEVEL;
}
//
@@ -175,7 +175,7 @@ Returns:
while ((-2 << NewTpl) & gEventPending) {
gEfiCurrentTpl = CoreHighestSetBit (gEventPending);
if (gEfiCurrentTpl < EFI_TPL_HIGH_LEVEL) {
if (gEfiCurrentTpl < TPL_HIGH_LEVEL) {
CoreSetInterruptState (TRUE);
}
CoreDispatchEventNotifies (gEfiCurrentTpl);
@@ -191,7 +191,7 @@ Returns:
// If lowering below HIGH_LEVEL, make sure
// interrupts are enabled
//
if (gEfiCurrentTpl < EFI_TPL_HIGH_LEVEL) {
if (gEfiCurrentTpl < TPL_HIGH_LEVEL) {
CoreSetInterruptState (TRUE);
}