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