]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Dxe/Event/Event.h
8141c5003eec73e2e230960119ae802133f0b3ac
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Event / Event.h
1 /** @file
2 UEFI Event support functions and structure.
3
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __EVENT_H__
11 #define __EVENT_H__
12
13
14 #define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)
15 extern UINTN gEventPending;
16
17 ///
18 /// Set if Event is part of an event group
19 ///
20 #define EVT_EXFLAG_EVENT_GROUP 0x01
21 ///
22 /// Set if Event is registered on a protocol notify
23 ///
24 #define EVT_EXFLAG_EVENT_PROTOCOL_NOTIFICATION 0x02
25
26 //
27 // EFI_EVENT
28 //
29
30 ///
31 /// Timer event information
32 ///
33 typedef struct {
34 LIST_ENTRY Link;
35 UINT64 TriggerTime;
36 UINT64 Period;
37 } TIMER_EVENT_INFO;
38
39 #define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')
40 typedef struct {
41 UINTN Signature;
42 UINT32 Type;
43 UINT32 SignalCount;
44 ///
45 /// Entry if the event is registered to be signalled
46 ///
47 LIST_ENTRY SignalLink;
48 ///
49 /// Notification information for this event
50 ///
51 EFI_TPL NotifyTpl;
52 EFI_EVENT_NOTIFY NotifyFunction;
53 VOID *NotifyContext;
54 EFI_GUID EventGroup;
55 LIST_ENTRY NotifyLink;
56 UINT8 ExFlag;
57 ///
58 /// A list of all runtime events
59 ///
60 EFI_RUNTIME_EVENT_ENTRY RuntimeData;
61 TIMER_EVENT_INFO Timer;
62 } IEVENT;
63
64 //
65 // Internal prototypes
66 //
67
68
69 /**
70 Dispatches all pending events.
71
72 @param Priority The task priority level of event notifications
73 to dispatch
74
75 **/
76 VOID
77 CoreDispatchEventNotifies (
78 IN EFI_TPL Priority
79 );
80
81
82 /**
83 Initializes timer support.
84
85 **/
86 VOID
87 CoreInitializeTimer (
88 VOID
89 );
90
91 #endif