summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Core
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-21 01:27:01 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-21 01:27:01 +0000
commitce8bd86e8f49f17fd2b11e14bbc3b3e816d82c1b (patch)
treedebf442dc842965b2eb441ea3d10d2e015838f35 /EdkModulePkg/Core
parent6dcb94c713b1373cc78117b7713e654889802114 (diff)
downloadedk2-platforms-ce8bd86e8f49f17fd2b11e14bbc3b3e816d82c1b.tar.xz
1. Removed #ifdef EDK_RELEASE_VERSION from all c files for all modules
2. Removed #ifdef EFI_SPECIFICATION_VERSION from all c files for all modules 3. Added comments for file VariableWorker.c git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2495 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Core')
-rw-r--r--EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c127
-rw-r--r--EdkModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c17
-rw-r--r--EdkModulePkg/Core/Dxe/Event/event.c172
3 files changed, 107 insertions, 209 deletions
diff --git a/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c b/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 9252d85ebf..fce61bd45e 100644
--- a/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -1,13 +1,13 @@
/*++
-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 - 2007, 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:
@@ -67,7 +67,7 @@ EFI_BOOT_SERVICES mBootServices = {
sizeof (EFI_BOOT_SERVICES), // HeaderSize
0, // CRC32
0 // Reserved
- },
+ },
(EFI_RAISE_TPL) CoreRaiseTpl, // RaiseTPL
(EFI_RESTORE_TPL) CoreRestoreTpl, // RestoreTPL
(EFI_ALLOCATE_PAGES) CoreAllocatePages, // AllocatePages
@@ -110,11 +110,8 @@ EFI_BOOT_SERVICES mBootServices = {
(EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) CoreUninstallMultipleProtocolInterfaces, // UninstallMultipleProtocolInterfaces
(EFI_CALCULATE_CRC32) CoreEfiNotAvailableYetArg3, // CalculateCrc32
(EFI_COPY_MEM) CopyMem, // CopyMem
- (EFI_SET_MEM) SetMem // SetMem
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
- ,
- (EFI_CREATE_EVENT_EX) CoreCreateEventEx // CreateEventEx
-#endif
+ (EFI_SET_MEM) SetMem, // SetMem
+ (EFI_CREATE_EVENT_EX) CoreCreateEventEx // CreateEventEx
};
EFI_DXE_SERVICES mDxeServices = {
@@ -174,33 +171,20 @@ EFI_RUNTIME_SERVICES mEfiRuntimeServicesTableTemplate = {
0, // CRC32
0 // Reserved
},
- (EFI_GET_TIME) CoreEfiNotAvailableYetArg2, // GetTime
- (EFI_SET_TIME) CoreEfiNotAvailableYetArg1, // SetTime
- (EFI_GET_WAKEUP_TIME) CoreEfiNotAvailableYetArg3, // GetWakeupTime
- (EFI_SET_WAKEUP_TIME) CoreEfiNotAvailableYetArg2, // SetWakeupTime
- (EFI_SET_VIRTUAL_ADDRESS_MAP) CoreEfiNotAvailableYetArg4, // SetVirtualAddressMap
- (EFI_CONVERT_POINTER) CoreEfiNotAvailableYetArg2, // ConvertPointer
- (EFI_GET_VARIABLE) CoreEfiNotAvailableYetArg5, // GetVariable
- (EFI_GET_NEXT_VARIABLE_NAME) CoreEfiNotAvailableYetArg3, // GetNextVariableName
- (EFI_SET_VARIABLE) CoreEfiNotAvailableYetArg5, // SetVariable
- (EFI_GET_NEXT_HIGH_MONO_COUNT) CoreEfiNotAvailableYetArg1, // GetNextHighMonotonicCount
- (EFI_RESET_SYSTEM) CoreEfiNotAvailableYetArg4 // ResetSystem
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
- //
- // This Tiano extension was removed when UEFI 2.0 support was added.
- // It's now just a protocol.
- //
- ,
- (EFI_REPORT_STATUS_CODE) CoreEfiNotAvailableYetArg5 // ReportStatusCode
-#elif (EFI_SPECIFICATION_VERSION >= 0x00020000)
- //
- // New runtime services added by UEFI 2.0
- //
- ,
+ (EFI_GET_TIME) CoreEfiNotAvailableYetArg2, // GetTime
+ (EFI_SET_TIME) CoreEfiNotAvailableYetArg1, // SetTime
+ (EFI_GET_WAKEUP_TIME) CoreEfiNotAvailableYetArg3, // GetWakeupTime
+ (EFI_SET_WAKEUP_TIME) CoreEfiNotAvailableYetArg2, // SetWakeupTime
+ (EFI_SET_VIRTUAL_ADDRESS_MAP) CoreEfiNotAvailableYetArg4, // SetVirtualAddressMap
+ (EFI_CONVERT_POINTER) CoreEfiNotAvailableYetArg2, // ConvertPointer
+ (EFI_GET_VARIABLE) CoreEfiNotAvailableYetArg5, // GetVariable
+ (EFI_GET_NEXT_VARIABLE_NAME) CoreEfiNotAvailableYetArg3, // GetNextVariableName
+ (EFI_SET_VARIABLE) CoreEfiNotAvailableYetArg5, // SetVariable
+ (EFI_GET_NEXT_HIGH_MONO_COUNT) CoreEfiNotAvailableYetArg1, // GetNextHighMonotonicCount
+ (EFI_RESET_SYSTEM) CoreEfiNotAvailableYetArg4, // ResetSystem
(EFI_UPDATE_CAPSULE) CoreEfiNotAvailableYetArg3, // UpdateCapsule
(EFI_QUERY_CAPSULE_CAPABILITIES) CoreEfiNotAvailableYetArg4, // QueryCapsuleCapabilities
(EFI_QUERY_VARIABLE_INFO) CoreEfiNotAvailableYetArg4 // QueryVariableInfo
-#endif
};
EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
@@ -212,8 +196,8 @@ EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
// prevent people from having pointer math bugs in their code.
// now you have to use *DescriptorSize to make things work.
//
- sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),
- EFI_MEMORY_DESCRIPTOR_VERSION,
+ sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),
+ EFI_MEMORY_DESCRIPTOR_VERSION,
0,
NULL,
NULL,
@@ -224,7 +208,7 @@ EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
EFI_RUNTIME_ARCH_PROTOCOL *gRuntime = &gRuntimeTemplate;
//
-// DXE Core Global Variables for the EFI System Table, Boot Services Table,
+// DXE Core Global Variables for the EFI System Table, Boot Services Table,
// DXE Services Table, and Runtime Services Table
//
EFI_BOOT_SERVICES *gBS = &mBootServices;
@@ -311,7 +295,7 @@ Returns:
ASSERT (gRT != NULL);
gST->RuntimeServices = gRT;
-
+
//
// Start the Image Services.
//
@@ -353,13 +337,6 @@ Returns:
// Initialize the ReportStatusCode with PEI version, if available
//
CoreGetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **)&gStatusCode->ReportStatusCode);
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
- //
- // This Tiano extension was removed when UEFI 2.0 support was added.
- // It's now just a protocol.
- //
- gRT->ReportStatusCode = gStatusCode->ReportStatusCode;
-#endif
//
// Report Status Code here for DXE_ENTRY_POINT once it is available
@@ -386,22 +363,22 @@ Returns:
Status = CoreInitializeEventServices ();
ASSERT_EFI_ERROR (Status);
-
+
//
// Get the Protocols that were passed in from PEI to DXE through GUIDed HOBs
//
- // These Protocols are not architectural. This implementation is sharing code between
- // PEI and DXE in order to save FLASH space. These Protocols could also be implemented
- // as part of the DXE Core. However, that would also require the DXE Core to be ported
- // each time a different CPU is used, a different Decompression algorithm is used, or a
- // different Image type is used. By placing these Protocols in PEI, the DXE Core remains
- // generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform,
+ // These Protocols are not architectural. This implementation is sharing code between
+ // PEI and DXE in order to save FLASH space. These Protocols could also be implemented
+ // as part of the DXE Core. However, that would also require the DXE Core to be ported
+ // each time a different CPU is used, a different Decompression algorithm is used, or a
+ // different Image type is used. By placing these Protocols in PEI, the DXE Core remains
+ // generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform,
// and from CPU to CPU.
//
//
// Publish the EFI, Tiano, and Custom Decompress protocols for use by other DXE components
- //
+ //
Status = CoreInstallMultipleProtocolInterfaces (
&mDecompressHandle,
&gEfiDecompressProtocolGuid, &gEfiDecompress,
@@ -430,7 +407,7 @@ Returns:
ASSERT_EFI_ERROR (Status);
//
- // Produce the Section Extraction Protocol
+ // Produce the Section Extraction Protocol
//
Status = InitializeSectionExtraction (gDxeCoreImageHandle, gST);
ASSERT_EFI_ERROR (Status);
@@ -455,7 +432,7 @@ Returns:
DEBUG_CODE_BEGIN ();
CoreDisplayMissingArchProtocols ();
DEBUG_CODE_END ();
-
+
//
// Assert if the Architectural Protocols are not present.
//
@@ -477,7 +454,7 @@ Returns:
// Transfer control to the BDS Architectural Protocol
//
gBds->Entry (gBds);
-
+
//
// BDS should never return
//
@@ -561,7 +538,7 @@ Routine Description:
Arguments:
Arg1 - Undefined
-
+
Arg2 - Undefined
Returns:
@@ -595,9 +572,9 @@ Routine Description:
Arguments:
Arg1 - Undefined
-
+
Arg2 - Undefined
-
+
Arg3 - Undefined
Returns:
@@ -632,11 +609,11 @@ Routine Description:
Arguments:
Arg1 - Undefined
-
+
Arg2 - Undefined
-
+
Arg3 - Undefined
-
+
Arg4 - Undefined
Returns:
@@ -672,13 +649,13 @@ Routine Description:
Arguments:
Arg1 - Undefined
-
+
Arg2 - Undefined
-
+
Arg3 - Undefined
-
+
Arg4 - Undefined
-
+
Arg5 - Undefined
Returns:
@@ -729,7 +706,7 @@ Returns:
if (GuidHob == NULL) {
return EFI_NOT_FOUND;
}
-
+
Buffer = GET_GUID_HOB_DATA (GuidHob);
ASSERT (Buffer != NULL);
@@ -763,14 +740,14 @@ Returns:
UINT32 Crc;
Hdr->CRC32 = 0;
-
+
//
// If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then
// Crc will come back as zero if we set it to zero here
//
Crc = 0;
gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);
- Hdr->CRC32 = Crc;
+ Hdr->CRC32 = Crc;
}
@@ -853,12 +830,12 @@ Returns:
//
SetMem (gBS, sizeof (EFI_BOOT_SERVICES), 0);
gBS = NULL;
-
+
//
// Update the AtRuntime field in Runtiem AP.
//
gRuntime->AtRuntime = TRUE;
-
+
return Status;
}
diff --git a/EdkModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c b/EdkModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
index b485210aef..51bc23ad3d 100644
--- a/EdkModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
+++ b/EdkModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, 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
@@ -43,25 +43,14 @@ ARCHITECTURAL_PROTOCOL_ENTRY mArchProtocols[] = {
{ &gEfiRuntimeArchProtocolGuid, (VOID **)&gRuntime, NULL, NULL, FALSE },
{ &gEfiVariableArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
{ &gEfiVariableWriteArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
#ifndef MDE_CPU_IPF
//
// UEFI 2.0 added support for Capsule services. DXE CIS ??? Added support for this AP
//
{ &gEfiCapsuleArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE},
#endif
-#endif
{ &gEfiMonotonicCounterArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
{ &gEfiResetArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
-#if ((EDK_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
- //
- // The ReportStatusCode Runtime service is in conflict with the UEFI 2.0 specificaiton
- // Thus gEfiStatusCodeRuntimeProtocolGuid becomes a normal protocol in UEFI 2.0 systems
- // It is only included if the EFI 1.10 with Tiano extensions is enabled for backward
- // compatability
- //
- { &gEfiStatusCodeRuntimeProtocolGuid, (VOID **)&gStatusCode, NULL, NULL, FALSE },
-#endif
{ &gEfiRealTimeClockArchProtocolGuid, (VOID **)NULL, NULL, NULL, FALSE },
{ NULL, (VOID **)NULL, NULL, NULL, FALSE }
};
@@ -182,7 +171,7 @@ Returns:
CopyMem (&TempLinkNode, Link, sizeof(LIST_ENTRY));
InsertTailList (&gRuntime->EventHead, Link);
}
-
+
//
// Clean up gRuntimeTemplate
//
@@ -271,9 +260,7 @@ static const GUID_TO_STRING_PROTOCOL_ENTRY MissingProtocols[] = {
{ &gEfiRuntimeArchProtocolGuid, (CHAR16 *)L"Runtime" },
{ &gEfiVariableArchProtocolGuid, (CHAR16 *)L"Variable" },
{ &gEfiVariableWriteArchProtocolGuid, (CHAR16 *)L"Variable Write" },
- #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
{ &gEfiCapsuleArchProtocolGuid, (CHAR16 *)L"Capsule" },
- #endif
{ &gEfiMonotonicCounterArchProtocolGuid, (CHAR16 *)L"Monotonic Counter" },
{ &gEfiResetArchProtocolGuid, (CHAR16 *)L"Reset" },
// { &gEfiStatusCodeRuntimeProtocolGuid, (CHAR16 *)L"Status Code" },
diff --git a/EdkModulePkg/Core/Dxe/Event/event.c b/EdkModulePkg/Core/Dxe/Event/event.c
index 3749657276..8f2934e711 100644
--- a/EdkModulePkg/Core/Dxe/Event/event.c
+++ b/EdkModulePkg/Core/Dxe/Event/event.c
@@ -1,13 +1,13 @@
/*++
-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 - 2007, 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:
@@ -16,7 +16,7 @@ Module Name:
Abstract:
EFI Event support
-
+
--*/
@@ -37,17 +37,17 @@ UINT32 mEventTable[] = {
//
EFI_EVENT_TIMER,
//
- // 0x00000100 Generic event with a notification function that
+ // 0x00000100 Generic event with a notification function that
// can be waited on with CheckEvent() or WaitForEvent()
//
EFI_EVENT_NOTIFY_WAIT,
//
- // 0x00000200 Generic event with a notification function that
+ // 0x00000200 Generic event with a notification function that
// is queue when the event is signaled with SignalEvent()
//
EFI_EVENT_NOTIFY_SIGNAL,
//
- // 0x00000201 ExitBootServicesEvent.
+ // 0x00000201 ExitBootServicesEvent.
//
EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,
//
@@ -55,33 +55,14 @@ UINT32 mEventTable[] = {
//
EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
-#if (EFI_SPECIFICATION_VERSION < 0x00020000)
- //
- // 0x00000203 ReadyToBootEvent.
- //
- EFI_EVENT_SIGNAL_READY_TO_BOOT,
- //
- // 0x00000204 LegacyBootEvent.
- //
- EFI_EVENT_SIGNAL_LEGACY_BOOT,
- //
- // 0x00000603 Signal all ReadyToBootEvents.
- //
- EFI_EVENT_NOTIFY_SIGNAL_ALL | EFI_EVENT_SIGNAL_READY_TO_BOOT,
- //
- // 0x00000604 Signal all LegacyBootEvents.
- //
- EFI_EVENT_NOTIFY_SIGNAL_ALL | EFI_EVENT_SIGNAL_LEGACY_BOOT,
-#endif
-
//
- // 0x00000000 Generic event without a notification function.
- // It can be signaled with SignalEvent() and checked with CheckEvent()
+ // 0x00000000 Generic event without a notification function.
+ // It can be signaled with SignalEvent() and checked with CheckEvent()
// or WaitForEvent().
//
0x00000000,
//
- // 0x80000100 Timer event with a notification function that can be
+ // 0x80000100 Timer event with a notification function that can be
// waited on with CheckEvent() or WaitForEvent()
//
EFI_EVENT_TIMER | EFI_EVENT_NOTIFY_WAIT,
@@ -149,7 +130,7 @@ Routine Description:
Arguments:
None
-
+
Returns:
EFI_SUCCESS - Always return success
@@ -163,7 +144,7 @@ Returns:
}
CoreInitializeTimer ();
-
+
return EFI_SUCCESS;
}
@@ -176,12 +157,12 @@ CoreDispatchEventNotifies (
Routine Description:
- Dispatches all pending events.
+ Dispatches all pending events.
Arguments:
Priority - The task priority level of event notifications to dispatch
-
+
Returns:
None
@@ -190,7 +171,7 @@ Returns:
{
IEVENT *Event;
LIST_ENTRY *Head;
-
+
CoreAcquireEventLock ();
ASSERT (gEventQueueLock.OwnerTpl == Priority);
Head = &gEventQueue[Priority];
@@ -199,7 +180,7 @@ Returns:
// Dispatch all the pending notifications
//
while (!IsListEmpty (Head)) {
-
+
Event = CR (Head->ForwardLink, IEVENT, NotifyLink, EVENT_SIGNATURE);
RemoveEntryList (&Event->NotifyLink);
@@ -214,7 +195,7 @@ Returns:
}
CoreReleaseEventLock ();
-
+
//
// Notify this event
//
@@ -246,7 +227,7 @@ Routine Description:
Arguments:
Event - The Event to notify
-
+
Returns:
None
@@ -268,7 +249,7 @@ Returns:
Event->NotifyLink.ForwardLink = NULL;
}
- //
+ //
// Queue the event to the pending notification list
//
@@ -289,7 +270,7 @@ Routine Description:
Arguments:
EventGroup - The list to signal
-
+
Returns:
None
@@ -313,33 +294,6 @@ Returns:
CoreReleaseEventLock ();
}
-
-#if (EFI_SPECIFICATION_VERSION < 0x00020000)
-
-static
-VOID
-EFIAPI
-EventNotifySignalAllNullEvent (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-{
- //
- // This null event is a size efficent way to enusre that
- // EFI_EVENT_NOTIFY_SIGNAL_ALL is error checked correctly.
- // EFI_EVENT_NOTIFY_SIGNAL_ALL is now mapped into
- // CreateEventEx() and this function is used to make the
- // old error checking in CreateEvent() for Tiano extensions
- // function.
- //
- return;
-}
-
-#endif
-
-
-
-
EFI_STATUS
EFIAPI
CoreCreateEvent (
@@ -368,42 +322,22 @@ Returns:
EFI_OUT_OF_RESOURCES - The event could not be allocated
--*/
-{
+{
EFI_GUID *GuidPtr;
EFI_EVENT_NOTIFY Function;
-
+
GuidPtr = NULL;
Function = NotifyFunction;
-#if (EFI_SPECIFICATION_VERSION < 0x00020000)
- //
- // Clear EFI_EVENT_NOFITY_SIGNAL_ALL (Tiano extension) as all events in the
- // EventGroup now have this property. So we need to filter it out.
- //
- if (Type & EFI_EVENT_NOTIFY_SIGNAL_ALL) {
- Type &= ~EFI_EVENT_NOTIFY_SIGNAL_ALL;
- Function = EventNotifySignalAllNullEvent;
- }
-
- //
- // Map the Tiano extensions Events to CreateEventEx form
- //
- if (Type == EFI_EVENT_SIGNAL_READY_TO_BOOT) {
- GuidPtr = &gEfiEventReadyToBootGuid;
- } else if (Type == EFI_EVENT_SIGNAL_LEGACY_BOOT) {
- GuidPtr = &gEfiEventLegacyBootGuid
- }
-#endif
-
//
// Convert EFI 1.10 Events to thier UEFI 2.0 CreateEventEx mapping
- //
+ //
if (Type == EVENT_SIGNAL_EXIT_BOOT_SERVICES) {
GuidPtr = &gEfiEventExitBootServicesGuid;
} else if (Type == EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
GuidPtr = &gEfiEventVirtualAddressChangeGuid;
}
-
+
return CoreCreateEventEx (Type, NotifyTpl, Function, NotifyContext, GuidPtr, Event);
}
@@ -469,8 +403,8 @@ Returns:
//
// Check for an invalid NotifyFunction or NotifyTpl
//
- if ((NotifyFunction == NULL) ||
- (NotifyTpl < EFI_TPL_APPLICATION) ||
+ if ((NotifyFunction == NULL) ||
+ (NotifyTpl < EFI_TPL_APPLICATION) ||
(NotifyTpl >= EFI_TPL_HIGH_LEVEL)) {
return EFI_INVALID_PARAMETER;
}
@@ -488,7 +422,7 @@ Returns:
// Allcoate and initialize a new event structure.
//
Status = CoreAllocatePool (
- (Type & EFI_EVENT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
+ (Type & EFI_EVENT_RUNTIME) ? EfiRuntimeServicesData: EfiBootServicesData,
sizeof (IEVENT),
(VOID **)&IEvent
);
@@ -500,7 +434,7 @@ Returns:
IEvent->Signature = EVENT_SIGNATURE;
IEvent->Type = Type;
-
+
IEvent->NotifyTpl = NotifyTpl;
IEvent->NotifyFunction = NotifyFunction;
IEvent->NotifyContext = (VOID *)NotifyContext;
@@ -524,16 +458,16 @@ Returns:
}
CoreAcquireEventLock ();
-
+
if ((Type & EFI_EVENT_NOTIFY_SIGNAL) != 0x00000000) {
//
// The Event's NotifyFunction must be queued whenever the event is signaled
//
InsertHeadList (&gEventSignalQueue, &IEvent->SignalLink);
}
-
+
CoreReleaseEventLock ();
-
+
//
// Done
//
@@ -552,15 +486,15 @@ CoreSignalEvent (
Routine Description:
Signals the event. Queues the event to be notified if needed
-
+
Arguments:
UserEvent - The event to signal
-
+
Returns:
EFI_INVALID_PARAMETER - Parameters are not valid.
-
+
EFI_SUCCESS - The event was signaled.
--*/
@@ -592,8 +526,8 @@ Returns:
if (Event->Type & EFI_EVENT_NOTIFY_SIGNAL) {
if (Event->ExFlag) {
//
- // The CreateEventEx() style requires all members of the Event Group
- // to be signaled.
+ // The CreateEventEx() style requires all members of the Event Group
+ // to be signaled.
//
CoreReleaseEventLock ();
CoreNotifySignalList (&Event->EventGroup);
@@ -619,11 +553,11 @@ CoreCheckEvent (
Routine Description:
Check the status of an event
-
+
Arguments:
UserEvent - The event to check
-
+
Returns:
EFI_SUCCESS - The event is in the signaled state
@@ -697,17 +631,17 @@ CoreWaitForEvent (
Routine Description:
Stops execution until an event is signaled.
-
+
Arguments:
NumberOfEvents - The number of events in the UserEvents array
UserEvents - An array of EFI_EVENT
UserIndex - Pointer to the index of the event which satisfied the wait condition
-
+
Returns:
EFI_SUCCESS - The event indicated by Index was signaled.
- EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
+ EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
Event was not a valid type
EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
@@ -725,7 +659,7 @@ Returns:
}
for(;;) {
-
+
for(Index = 0; Index < NumberOfEvents; Index++) {
Status = CoreCheckEvent (UserEvents[Index]);
@@ -742,7 +676,7 @@ Returns:
//
// 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.
- //
+ //
}
}
@@ -757,15 +691,15 @@ CoreCloseEvent (
Routine Description:
Closes an event and frees the event structure.
-
+
Arguments:
UserEvent - Event to close
-
+
Returns:
EFI_INVALID_PARAMETER - Parameters are not valid.
-
+
EFI_SUCCESS - The event has been closed
--*/
@@ -796,11 +730,11 @@ Returns:
//
// If the event is queued somewhere, remove it
//
-
+
if (Event->RuntimeData.Link.ForwardLink != NULL) {
RemoveEntryList (&Event->RuntimeData.Link);
}
-
+
if (Event->NotifyLink.ForwardLink != NULL) {
RemoveEntryList (&Event->NotifyLink);
}