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