]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Dxe/Exec.h
Add comments and DoxyGen format for these files.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Exec.h
1 /** @file
2
3 UEFI Event support functions and structure.
4
5 Copyright (c) 2006 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _EXEC_H_
17 #define _EXEC_H_
18
19 #define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)
20
21 //
22 // EFI_EVENT
23 //
24
25
26
27 #define EVENT_SIGNATURE EFI_SIGNATURE_32('e','v','n','t')
28 typedef struct {
29 UINTN Signature;
30 UINT32 Type;
31 UINT32 SignalCount;
32
33 //
34 // Entry if the event is registered to be signalled
35 //
36
37 LIST_ENTRY SignalLink;
38
39 //
40 // Notification information for this event
41 //
42
43 EFI_TPL NotifyTpl;
44 EFI_EVENT_NOTIFY NotifyFunction;
45 VOID *NotifyContext;
46 EFI_GUID EventGroup;
47 LIST_ENTRY NotifyLink;
48 BOOLEAN ExFlag;
49
50 //
51 // A list of all runtime events
52 //
53 EFI_RUNTIME_EVENT_ENTRY RuntimeData;
54
55 //
56 // Information by event type
57 //
58
59 union {
60 //
61 // For timer events
62 //
63 struct {
64 LIST_ENTRY Link;
65 UINT64 TriggerTime;
66 UINT64 Period;
67 } Timer;
68 } u;
69
70 } IEVENT;
71
72 //
73 // Internal prototypes
74 //
75
76 VOID
77 CoreDispatchEventNotifies (
78 IN EFI_TPL Priority
79 )
80 /*++
81
82 Routine Description:
83
84 Dispatches all pending events.
85
86 Arguments:
87
88 Priority - The task priority level of event notifications to dispatch
89
90 Returns:
91
92 None
93
94 --*/
95 ;
96
97
98 UINTN
99 CoreHighestSetBit (
100 IN UINTN Number
101 )
102 /*++
103
104 Routine Description:
105
106 Return the highest set bit
107
108 Arguments:
109
110 Number - The value to check
111
112 Returns:
113
114 Bit position of the highest set bit
115
116 --*/
117 ;
118
119
120 BOOLEAN
121 GetInterruptState (
122 VOID
123 )
124 /*++
125
126 Routine Description:
127
128 Disables CPU interrupts.
129
130 Arguments:
131
132 This - Protocol instance structure
133
134 State - Pointer to the CPU's current interrupt state
135
136 Returns:
137
138 EFI_SUCCESS - If interrupts were disabled in the CPU.
139
140 EFI_INVALID_PARAMETER - State is NULL.
141
142 --*/
143 ;
144
145 //
146 // Exported functions
147 //
148
149 VOID
150 CoreEventVirtualAddressFixup (
151 VOID
152 )
153 /*++
154
155 Routine Description:
156
157 A function out of date, should be removed.
158
159 Arguments:
160
161 None
162
163 Returns:
164
165 None
166
167 --*/
168 ;
169
170
171 VOID
172 CoreInitializeTimer (
173 VOID
174 )
175 /*++
176
177 Routine Description:
178
179 Initializes timer support
180
181 Arguments:
182
183 None
184
185 Returns:
186
187 None
188
189 --*/
190 ;
191
192 //
193 // extern data declarations
194 //
195
196 extern EFI_LOCK gEventQueueLock;
197 extern UINTN gEventPending;
198 extern LIST_ENTRY gEventQueue[];
199 extern LIST_ENTRY gEventSignalQueue;
200 extern UINT8 gHSB[];
201
202 #endif