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