]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Dxe/Exec.h
Add doxygen style comments for functions in DxeMain.
[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
77 /**
78 Dispatches all pending events.
79
80 @param Priority The task priority level of event notifications
81 to dispatch
82
83 **/
84 VOID
85 CoreDispatchEventNotifies (
86 IN EFI_TPL Priority
87 )
88 ;
89
90
91
92 /**
93 Return the highest set bit.
94
95 @param Number The value to check
96
97 @return Bit position of the highest set bit
98
99 **/
100 UINTN
101 CoreHighestSetBit (
102 IN UINTN Number
103 )
104 ;
105
106
107
108 /**
109 Disables CPU interrupts.
110
111 @retval EFI_SUCCESS If interrupts were disabled in the CPU.
112 @retval EFI_INVALID_PARAMETER State is NULL.
113
114 **/
115 BOOLEAN
116 GetInterruptState (
117 VOID
118 )
119 ;
120
121 //
122 // Exported functions
123 //
124
125
126 /**
127 A function out of date, should be removed.
128
129 **/
130 VOID
131 CoreEventVirtualAddressFixup (
132 VOID
133 )
134 ;
135
136
137
138 /**
139 Initializes timer support.
140
141 **/
142 VOID
143 CoreInitializeTimer (
144 VOID
145 )
146 ;
147
148 //
149 // extern data declarations
150 //
151
152 extern EFI_LOCK gEventQueueLock;
153 extern UINTN gEventPending;
154 extern LIST_ENTRY gEventQueue[];
155 extern LIST_ENTRY gEventSignalQueue;
156
157 #endif