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