From ec90508b3d3ff22a698a0446cb09d551d7466045 Mon Sep 17 00:00:00 2001 From: eric_tian Date: Tue, 23 Sep 2008 07:35:34 +0000 Subject: move header files in MdeModulePkg\Core\Dxe except DxeMain.h into their corresponding sub-module directories. It is used to provide good modularity. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5949 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Dxe/Event/Event.c | 1 + MdeModulePkg/Core/Dxe/Event/Event.h | 91 +++++++++++++++++++++++++++++++++++++ MdeModulePkg/Core/Dxe/Event/Timer.c | 1 + MdeModulePkg/Core/Dxe/Event/Tpl.c | 2 +- 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 MdeModulePkg/Core/Dxe/Event/Event.h (limited to 'MdeModulePkg/Core/Dxe/Event') diff --git a/MdeModulePkg/Core/Dxe/Event/Event.c b/MdeModulePkg/Core/Dxe/Event/Event.c index 0e32aa4b66..204e9b3b70 100644 --- a/MdeModulePkg/Core/Dxe/Event/Event.c +++ b/MdeModulePkg/Core/Dxe/Event/Event.c @@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "DxeMain.h" +#include "Event.h" /// /// gEfiCurrentTpl - Current Task priority level diff --git a/MdeModulePkg/Core/Dxe/Event/Event.h b/MdeModulePkg/Core/Dxe/Event/Event.h new file mode 100644 index 0000000000..f9384bc6cb --- /dev/null +++ b/MdeModulePkg/Core/Dxe/Event/Event.h @@ -0,0 +1,91 @@ +/** @file + UEFI Event support functions and structure. + +Copyright (c) 2006 - 2008, 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. + +**/ + +#ifndef __EVENT_H__ +#define __EVENT_H__ + + +#define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL) +extern UINTN gEventPending; + + +// +// EFI_EVENT +// +#define EVENT_SIGNATURE EFI_SIGNATURE_32('e','v','n','t') +typedef struct { + UINTN Signature; + UINT32 Type; + UINT32 SignalCount; + /// + /// Entry if the event is registered to be signalled + /// + LIST_ENTRY SignalLink; + /// + /// Notification information for this event + /// + EFI_TPL NotifyTpl; + EFI_EVENT_NOTIFY NotifyFunction; + VOID *NotifyContext; + EFI_GUID EventGroup; + LIST_ENTRY NotifyLink; + BOOLEAN ExFlag; + /// + /// A list of all runtime events + /// + EFI_RUNTIME_EVENT_ENTRY RuntimeData; + /// + /// Information by event type + /// + union { + /// + /// For timer events + /// + struct { + LIST_ENTRY Link; + UINT64 TriggerTime; + UINT64 Period; + } Timer; + } u; + +} IEVENT; + +// +// Internal prototypes +// + + +/** + Dispatches all pending events. + + @param Priority The task priority level of event notifications + to dispatch + +**/ +VOID +CoreDispatchEventNotifies ( + IN EFI_TPL Priority + ); + + +/** + Initializes timer support. + +**/ +VOID +CoreInitializeTimer ( + VOID + ); + +#endif diff --git a/MdeModulePkg/Core/Dxe/Event/Timer.c b/MdeModulePkg/Core/Dxe/Event/Timer.c index e1df72153d..eefd5a70c2 100644 --- a/MdeModulePkg/Core/Dxe/Event/Timer.c +++ b/MdeModulePkg/Core/Dxe/Event/Timer.c @@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "DxeMain.h" +#include "Event.h" // // Internal data diff --git a/MdeModulePkg/Core/Dxe/Event/Tpl.c b/MdeModulePkg/Core/Dxe/Event/Tpl.c index 43bc8add36..dd9c57e1d3 100644 --- a/MdeModulePkg/Core/Dxe/Event/Tpl.c +++ b/MdeModulePkg/Core/Dxe/Event/Tpl.c @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include "DxeMain.h" - +#include "Event.h" /** Set Interrupt State. -- cgit v1.2.3