]>
Commit | Line | Data |
---|---|---|
959ccb23 | 1 | /** @file\r |
e0c047a0 | 2 | Include file that supports UEFI.\r |
959ccb23 | 3 | \r |
e0c047a0 | 4 | This include file must only contain things defined in the UEFI 2.1 specification.\r |
5 | If a code construct is defined in the UEFI 2.1 specification it must be included\r | |
959ccb23 | 6 | by this include file.\r |
7 | \r | |
e0c047a0 | 8 | Copyright (c) 2006 - 2008, Intel Corporation\r |
959ccb23 | 9 | All rights reserved. This program and the accompanying materials\r |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
959ccb23 | 17 | **/\r |
18 | \r | |
19 | #ifndef __UEFI_SPEC_H__\r | |
20 | #define __UEFI_SPEC_H__\r | |
21 | \r | |
22 | #include <Uefi/UefiMultiPhase.h>\r | |
23 | \r | |
24 | #include <Protocol/DevicePath.h>\r | |
25 | #include <Protocol/SimpleTextIn.h>\r | |
26 | #include <Protocol/SimpleTextOut.h>\r | |
27 | \r | |
8b13229b | 28 | ///\r |
2a3f6a21 | 29 | /// Enumeration of EFI memory allocation types.\r |
8b13229b | 30 | ///\r |
959ccb23 | 31 | typedef enum {\r |
2a3f6a21 | 32 | ///\r |
33 | /// Allocate any available range of pages that satisfies the request\r | |
34 | ///\r | |
959ccb23 | 35 | AllocateAnyPages,\r |
2a3f6a21 | 36 | ///\r |
37 | /// Allocate any available range of pages whose uppermost address is less than \r | |
38 | /// or equal to a specified maximum address\r | |
39 | ///\r | |
959ccb23 | 40 | AllocateMaxAddress,\r |
2a3f6a21 | 41 | ///\r |
42 | /// Allocate pages at a specified address\r | |
43 | ///\r | |
959ccb23 | 44 | AllocateAddress,\r |
2a3f6a21 | 45 | ///\r |
46 | /// Maximum enumeration value that may be used for bounds checking\r | |
47 | ///\r | |
959ccb23 | 48 | MaxAllocateType\r |
49 | } EFI_ALLOCATE_TYPE;\r | |
50 | \r | |
5413e8e8 | 51 | //\r |
52 | // Bit definitions for EFI_TIME.Daylight\r | |
53 | //\r | |
54 | #define EFI_TIME_ADJUST_DAYLIGHT 0x01\r | |
55 | #define EFI_TIME_IN_DAYLIGHT 0x02\r | |
56 | \r | |
8b13229b | 57 | ///\r |
58 | /// Value definition for EFI_TIME.TimeZone\r | |
59 | ///\r | |
5413e8e8 | 60 | #define EFI_UNSPECIFIED_TIMEZONE 0x07FF\r |
959ccb23 | 61 | \r |
62 | //\r | |
e0c047a0 | 63 | // Memory cacheability attributes\r |
959ccb23 | 64 | //\r |
65 | #define EFI_MEMORY_UC 0x0000000000000001ULL\r | |
66 | #define EFI_MEMORY_WC 0x0000000000000002ULL\r | |
67 | #define EFI_MEMORY_WT 0x0000000000000004ULL\r | |
68 | #define EFI_MEMORY_WB 0x0000000000000008ULL\r | |
69 | #define EFI_MEMORY_UCE 0x0000000000000010ULL\r | |
959ccb23 | 70 | //\r |
e0c047a0 | 71 | // Physical memory protection attributes\r |
959ccb23 | 72 | //\r |
00edb218 A |
73 | #define EFI_MEMORY_WP 0x0000000000001000ULL\r |
74 | #define EFI_MEMORY_RP 0x0000000000002000ULL\r | |
75 | #define EFI_MEMORY_XP 0x0000000000004000ULL\r | |
e0c047a0 | 76 | //\r |
77 | // Runtime memory attribute\r | |
78 | //\r | |
79 | #define EFI_MEMORY_RUNTIME 0x8000000000000000ULL\r | |
959ccb23 | 80 | \r |
8b13229b | 81 | ///\r |
e0c047a0 | 82 | /// Memory descriptor version number\r |
8b13229b | 83 | ///\r |
959ccb23 | 84 | #define EFI_MEMORY_DESCRIPTOR_VERSION 1\r |
e0c047a0 | 85 | \r |
86 | ///\r | |
2a3f6a21 | 87 | /// Definition of an EFI memory descriptor\r |
e0c047a0 | 88 | ///\r |
959ccb23 | 89 | typedef struct {\r |
2a3f6a21 | 90 | ///\r |
91 | /// Type of the memory region. See EFI_MEMORY_TYPE\r | |
92 | ///\r | |
00edb218 | 93 | UINT32 Type;\r |
2a3f6a21 | 94 | ///\r |
95 | /// Physical address of the first byte of the memory region. Must aligned \r | |
96 | /// on a 4 KB boundary.\r | |
97 | ///\r | |
00edb218 | 98 | EFI_PHYSICAL_ADDRESS PhysicalStart;\r |
2a3f6a21 | 99 | ///\r |
100 | /// Virtual address of the first byte of the memory region. Must aligned \r | |
101 | /// on a 4 KB boundary.\r | |
102 | ///\r | |
00edb218 | 103 | EFI_VIRTUAL_ADDRESS VirtualStart;\r |
2a3f6a21 | 104 | ///\r |
105 | /// Number of 4KB pages in the memory region.\r | |
106 | ///\r | |
00edb218 | 107 | UINT64 NumberOfPages;\r |
2a3f6a21 | 108 | ///\r |
109 | /// Attributes of the memory region that describe the bit mask of capabilities\r | |
110 | /// for that memory region, and not necessarily the current settings for that \r | |
111 | /// memory region.\r | |
112 | ///\r | |
00edb218 | 113 | UINT64 Attribute;\r |
959ccb23 | 114 | } EFI_MEMORY_DESCRIPTOR;\r |
115 | \r | |
959ccb23 | 116 | /**\r |
117 | Allocates memory pages from the system.\r | |
118 | \r | |
119 | @param Type The type of allocation to perform.\r | |
120 | @param MemoryType The type of memory to allocate.\r | |
121 | @param Pages The number of contiguous 4 KB pages to allocate.\r | |
122 | @param Memory Pointer to a physical address. On input, the way in which the address is\r | |
123 | used depends on the value of Type.\r | |
124 | \r | |
125 | @retval EFI_SUCCESS The requested pages were allocated.\r | |
126 | @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or\r | |
127 | AllocateMaxAddress or AllocateAddress.\r | |
128 | 2) MemoryType is in the range\r | |
129 | EfiMaxMemoryType..0x7FFFFFFF.\r | |
130 | @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.\r | |
131 | @retval EFI_NOT_FOUND The requested pages could not be found.\r | |
132 | \r | |
133 | **/\r | |
134 | typedef\r | |
135 | EFI_STATUS\r | |
8b13229b | 136 | (EFIAPI *EFI_ALLOCATE_PAGES)(\r |
959ccb23 | 137 | IN EFI_ALLOCATE_TYPE Type,\r |
138 | IN EFI_MEMORY_TYPE MemoryType,\r | |
139 | IN UINTN Pages,\r | |
140 | IN OUT EFI_PHYSICAL_ADDRESS *Memory\r | |
141 | );\r | |
142 | \r | |
143 | /**\r | |
144 | Frees memory pages.\r | |
145 | \r | |
146 | @param Memory The base physical address of the pages to be freed.\r | |
147 | @param Pages The number of contiguous 4 KB pages to free.\r | |
148 | \r | |
149 | @retval EFI_SUCCESS The requested pages were freed.\r | |
150 | @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.\r | |
151 | @retval EFI_NOT_FOUND The requested memory pages were not allocated with\r | |
152 | AllocatePages().\r | |
153 | \r | |
154 | **/\r | |
155 | typedef\r | |
156 | EFI_STATUS\r | |
8b13229b | 157 | (EFIAPI *EFI_FREE_PAGES)(\r |
959ccb23 | 158 | IN EFI_PHYSICAL_ADDRESS Memory,\r |
159 | IN UINTN Pages\r | |
160 | );\r | |
161 | \r | |
162 | /**\r | |
163 | Returns the current memory map.\r | |
164 | \r | |
165 | @param MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer.\r | |
e0c047a0 | 166 | On input, this is the size of the buffer allocated by the caller.\r |
167 | On output, it is the size of the buffer returned by the firmware if\r | |
168 | the buffer was large enough, or the size of the buffer needed to contain\r | |
169 | the map if the buffer was too small.\r | |
959ccb23 | 170 | @param MemoryMap A pointer to the buffer in which firmware places the current memory\r |
171 | map.\r | |
172 | @param MapKey A pointer to the location in which firmware returns the key for the\r | |
173 | current memory map.\r | |
174 | @param DescriptorSize A pointer to the location in which firmware returns the size, in bytes, of\r | |
175 | an individual EFI_MEMORY_DESCRIPTOR.\r | |
176 | @param DescriptorVersion A pointer to the location in which firmware returns the version number\r | |
177 | associated with the EFI_MEMORY_DESCRIPTOR.\r | |
178 | \r | |
179 | @retval EFI_SUCCESS The memory map was returned in the MemoryMap buffer.\r | |
180 | @retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current buffer size\r | |
181 | needed to hold the memory map is returned in MemoryMapSize.\r | |
182 | @retval EFI_INVALID_PARAMETER 1) MemoryMapSize is NULL.\r | |
183 | 2) The MemoryMap buffer is not too small and MemoryMap is\r | |
184 | NULL.\r | |
185 | \r | |
186 | **/\r | |
187 | typedef\r | |
188 | EFI_STATUS\r | |
8b13229b | 189 | (EFIAPI *EFI_GET_MEMORY_MAP)(\r |
959ccb23 | 190 | IN OUT UINTN *MemoryMapSize,\r |
191 | IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,\r | |
192 | OUT UINTN *MapKey,\r | |
193 | OUT UINTN *DescriptorSize,\r | |
194 | OUT UINT32 *DescriptorVersion\r | |
195 | );\r | |
196 | \r | |
197 | /**\r | |
198 | Allocates pool memory.\r | |
199 | \r | |
200 | @param PoolType The type of pool to allocate.\r | |
201 | @param Size The number of bytes to allocate from the pool.\r | |
202 | @param Buffer A pointer to a pointer to the allocated buffer if the call succeeds;\r | |
203 | undefined otherwise.\r | |
204 | \r | |
205 | @retval EFI_SUCCESS The requested number of bytes was allocated.\r | |
206 | @retval EFI_OUT_OF_RESOURCES The pool requested could not be allocated.\r | |
207 | @retval EFI_INVALID_PARAMETER PoolType was invalid.\r | |
208 | \r | |
209 | **/\r | |
210 | typedef\r | |
211 | EFI_STATUS\r | |
8b13229b | 212 | (EFIAPI *EFI_ALLOCATE_POOL)(\r |
959ccb23 | 213 | IN EFI_MEMORY_TYPE PoolType,\r |
214 | IN UINTN Size,\r | |
215 | OUT VOID **Buffer\r | |
216 | );\r | |
217 | \r | |
218 | /**\r | |
219 | Returns pool memory to the system.\r | |
220 | \r | |
221 | @param Buffer Pointer to the buffer to free.\r | |
222 | \r | |
223 | @retval EFI_SUCCESS The memory was returned to the system.\r | |
224 | @retval EFI_INVALID_PARAMETER Buffer was invalid.\r | |
225 | \r | |
226 | **/\r | |
227 | typedef\r | |
228 | EFI_STATUS\r | |
8b13229b | 229 | (EFIAPI *EFI_FREE_POOL)(\r |
959ccb23 | 230 | IN VOID *Buffer\r |
231 | );\r | |
232 | \r | |
233 | /**\r | |
234 | Changes the runtime addressing mode of EFI firmware from physical to virtual.\r | |
235 | \r | |
236 | @param MemoryMapSize The size in bytes of VirtualMap.\r | |
237 | @param DescriptorSize The size in bytes of an entry in the VirtualMap.\r | |
238 | @param DescriptorVersion The version of the structure entries in VirtualMap.\r | |
239 | @param VirtualMap An array of memory descriptors which contain new virtual\r | |
240 | address mapping information for all runtime ranges.\r | |
241 | \r | |
242 | @retval EFI_SUCCESS The virtual address map has been applied.\r | |
243 | @retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in\r | |
244 | virtual address mapped mode.\r | |
245 | @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.\r | |
246 | @retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory\r | |
247 | map that requires a mapping.\r | |
248 | @retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found\r | |
249 | in the memory map.\r | |
250 | \r | |
251 | **/\r | |
252 | typedef\r | |
253 | EFI_STATUS\r | |
8b13229b | 254 | (EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP)(\r |
959ccb23 | 255 | IN UINTN MemoryMapSize,\r |
256 | IN UINTN DescriptorSize,\r | |
257 | IN UINT32 DescriptorVersion,\r | |
258 | IN EFI_MEMORY_DESCRIPTOR *VirtualMap\r | |
259 | );\r | |
260 | \r | |
261 | /**\r | |
262 | Connects one or more drivers to a controller.\r | |
263 | \r | |
264 | @param ControllerHandle The handle of the controller to which driver(s) are to be connected.\r | |
265 | @param DriverImageHandle A pointer to an ordered list handles that support the\r | |
266 | EFI_DRIVER_BINDING_PROTOCOL.\r | |
267 | @param RemainingDevicePath A pointer to the device path that specifies a child of the\r | |
268 | controller specified by ControllerHandle.\r | |
269 | @param Recursive If TRUE, then ConnectController() is called recursively\r | |
270 | until the entire tree of controllers below the controller specified\r | |
271 | by ControllerHandle have been created. If FALSE, then\r | |
272 | the tree of controllers is only expanded one level.\r | |
273 | \r | |
274 | @retval EFI_SUCCESS 1) One or more drivers were connected to ControllerHandle.\r | |
275 | 2) No drivers were connected to ControllerHandle, but\r | |
276 | RemainingDevicePath is not NULL, and it is an End Device\r | |
277 | Path Node.\r | |
278 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
279 | @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances\r | |
280 | present in the system.\r | |
281 | 2) No drivers were connected to ControllerHandle.\r | |
282 | \r | |
283 | **/\r | |
284 | typedef\r | |
285 | EFI_STATUS\r | |
8b13229b | 286 | (EFIAPI *EFI_CONNECT_CONTROLLER)(\r |
959ccb23 | 287 | IN EFI_HANDLE ControllerHandle,\r |
288 | IN EFI_HANDLE *DriverImageHandle, OPTIONAL\r | |
289 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath, OPTIONAL\r | |
290 | IN BOOLEAN Recursive\r | |
291 | );\r | |
292 | \r | |
293 | /**\r | |
294 | Disconnects one or more drivers from a controller.\r | |
295 | \r | |
296 | @param ControllerHandle The handle of the controller from which driver(s) are to be disconnected.\r | |
297 | @param DriverImageHandle The driver to disconnect from ControllerHandle.\r | |
e0c047a0 | 298 | If DriverImageHandle is NULL, then all the drivers currently managing\r |
299 | ControllerHandle are disconnected from ControllerHandle.\r | |
959ccb23 | 300 | @param ChildHandle The handle of the child to destroy.\r |
e0c047a0 | 301 | If ChildHandle is NULL, then all the children of ControllerHandle are\r |
302 | destroyed before the drivers are disconnected from ControllerHandle.\r | |
959ccb23 | 303 | \r |
304 | @retval EFI_SUCCESS 1) One or more drivers were disconnected from the controller.\r | |
305 | 2) On entry, no drivers are managing ControllerHandle.\r | |
306 | 3) DriverImageHandle is not NULL, and on entry\r | |
307 | DriverImageHandle is not managing ControllerHandle.\r | |
e0c047a0 | 308 | @retval EFI_INVALID_PARAMETER 1) ControllerHandle is not a valid EFI_HANDLE.\r |
309 | 2) DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.\r | |
310 | 3) ChildHandle is not NULL, and it is not a valid EFI_HANDLE.\r | |
311 | 4) DriverImageHandle does not support the EFI_DRIVER_BINDING_PROTOCOL.\r | |
959ccb23 | 312 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to disconnect any drivers from\r |
313 | ControllerHandle.\r | |
314 | @retval EFI_DEVICE_ERROR The controller could not be disconnected because of a device error.\r | |
315 | \r | |
316 | **/\r | |
317 | typedef\r | |
318 | EFI_STATUS\r | |
8b13229b | 319 | (EFIAPI *EFI_DISCONNECT_CONTROLLER)(\r |
959ccb23 | 320 | IN EFI_HANDLE ControllerHandle,\r |
321 | IN EFI_HANDLE DriverImageHandle, OPTIONAL\r | |
322 | IN EFI_HANDLE ChildHandle OPTIONAL\r | |
323 | );\r | |
324 | \r | |
325 | \r | |
326 | \r | |
327 | //\r | |
328 | // ConvertPointer DebugDisposition type.\r | |
329 | //\r | |
330 | #define EFI_OPTIONAL_PTR 0x00000001\r | |
331 | #define EFI_OPTIONAL_POINTER EFI_OPTIONAL_PTR\r | |
332 | \r | |
333 | /**\r | |
334 | Determines the new virtual address that is to be used on subsequent memory accesses.\r | |
335 | \r | |
336 | @param DebugDisposition Supplies type information for the pointer being converted.\r | |
337 | @param Address A pointer to a pointer that is to be fixed to be the value needed\r | |
338 | for the new virtual address mappings being applied.\r | |
339 | \r | |
340 | @retval EFI_SUCCESS The pointer pointed to by Address was modified.\r | |
341 | @retval EFI_INVALID_PARAMETER 1) Address is NULL.\r | |
342 | 2) *Address is NULL and DebugDisposition does\r | |
343 | not have the EFI_OPTIONAL_PTR bit set.\r | |
344 | @retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part\r | |
345 | of the current memory map. This is normally fatal.\r | |
346 | \r | |
347 | **/\r | |
348 | typedef\r | |
349 | EFI_STATUS\r | |
8b13229b | 350 | (EFIAPI *EFI_CONVERT_POINTER)(\r |
959ccb23 | 351 | IN UINTN DebugDisposition,\r |
352 | IN OUT VOID **Address\r | |
353 | );\r | |
354 | \r | |
355 | \r | |
356 | //\r | |
ac644614 | 357 | // These types can be ORed together as needed - for example,\r |
93ce5aca | 358 | // EVT_TIMER might be Ored with EVT_NOTIFY_WAIT or\r |
959ccb23 | 359 | // EVT_NOTIFY_SIGNAL.\r |
360 | //\r | |
00edb218 A |
361 | #define EVT_TIMER 0x80000000\r |
362 | #define EVT_RUNTIME 0x40000000\r | |
00edb218 A |
363 | #define EVT_NOTIFY_WAIT 0x00000100\r |
364 | #define EVT_NOTIFY_SIGNAL 0x00000200\r | |
93ce5aca | 365 | \r |
00edb218 | 366 | #define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201\r |
93ce5aca | 367 | #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202\r |
959ccb23 | 368 | \r |
369 | //\r | |
ac644614 | 370 | // The event's NotifyContext pointer points to a runtime memory\r |
d0c64728 | 371 | // address.\r |
959ccb23 | 372 | // The event is deprecated in UEFI2.0 and later specifications.\r |
d0c64728 | 373 | //\r |
959ccb23 | 374 | #define EVT_RUNTIME_CONTEXT 0x20000000\r |
375 | \r | |
376 | \r | |
377 | /**\r | |
378 | Invoke a notification event\r | |
379 | \r | |
380 | @param Event Event whose notification function is being invoked.\r | |
381 | @param Context Pointer to the notification function's context,\r | |
382 | which is implementation-dependent.\r | |
383 | \r | |
384 | **/\r | |
385 | typedef\r | |
386 | VOID\r | |
8b13229b | 387 | (EFIAPI *EFI_EVENT_NOTIFY)(\r |
959ccb23 | 388 | IN EFI_EVENT Event,\r |
389 | IN VOID *Context\r | |
390 | );\r | |
391 | \r | |
392 | /**\r | |
393 | Creates an event.\r | |
394 | \r | |
395 | @param Type The type of event to create and its mode and attributes.\r | |
e0c047a0 | 396 | @param NotifyTpl The task priority level of event notifications, if needed.\r |
959ccb23 | 397 | @param NotifyFunction Pointer to the event's notification function, if any.\r |
398 | @param NotifyContext Pointer to the notification function's context; corresponds to parameter\r | |
399 | Context in the notification function.\r | |
400 | @param Event Pointer to the newly created event if the call succeeds; undefined\r | |
401 | otherwise.\r | |
402 | \r | |
403 | @retval EFI_SUCCESS The event structure was created.\r | |
404 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r | |
405 | @retval EFI_OUT_OF_RESOURCES The event could not be allocated.\r | |
406 | \r | |
407 | **/\r | |
408 | typedef\r | |
409 | EFI_STATUS\r | |
8b13229b | 410 | (EFIAPI *EFI_CREATE_EVENT)(\r |
959ccb23 | 411 | IN UINT32 Type,\r |
412 | IN EFI_TPL NotifyTpl,\r | |
413 | IN EFI_EVENT_NOTIFY NotifyFunction,\r | |
414 | IN VOID *NotifyContext,\r | |
415 | OUT EFI_EVENT *Event\r | |
416 | );\r | |
417 | \r | |
418 | /**\r | |
419 | Creates an event in a group.\r | |
420 | \r | |
421 | @param Type The type of event to create and its mode and attributes.\r | |
e0c047a0 | 422 | @param NotifyTpl The task priority level of event notifications,if needed.\r |
959ccb23 | 423 | @param NotifyFunction Pointer to the event's notification function, if any.\r |
424 | @param NotifyContext Pointer to the notification function's context; corresponds to parameter\r | |
425 | Context in the notification function.\r | |
426 | @param EventGroup Pointer to the unique identifier of the group to which this event belongs.\r | |
e0c047a0 | 427 | If this is NULL, then the function behaves as if the parameters were passed\r |
428 | to CreateEvent.\r | |
959ccb23 | 429 | @param Event Pointer to the newly created event if the call succeeds; undefined\r |
430 | otherwise.\r | |
431 | \r | |
432 | @retval EFI_SUCCESS The event structure was created.\r | |
433 | @retval EFI_INVALID_PARAMETER One or more parameters are invalid.\r | |
434 | @retval EFI_OUT_OF_RESOURCES The event could not be allocated.\r | |
435 | \r | |
436 | **/\r | |
437 | typedef\r | |
438 | EFI_STATUS\r | |
8b13229b | 439 | (EFIAPI *EFI_CREATE_EVENT_EX)(\r |
959ccb23 | 440 | IN UINT32 Type,\r |
e0c047a0 | 441 | IN EFI_TPL NotifyTpl,\r |
959ccb23 | 442 | IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,\r |
443 | IN CONST VOID *NotifyContext OPTIONAL,\r | |
444 | IN CONST EFI_GUID *EventGroup OPTIONAL,\r | |
445 | OUT EFI_EVENT *Event\r | |
446 | );\r | |
447 | \r | |
e0c047a0 | 448 | ///\r |
449 | /// Timer delay types\r | |
450 | ///\r | |
959ccb23 | 451 | typedef enum {\r |
2a3f6a21 | 452 | ///\r |
453 | /// An event's timer settings is to be cancelled and not trigger time is to be set\r | |
454 | ///\r | |
959ccb23 | 455 | TimerCancel,\r |
2a3f6a21 | 456 | ///\r |
457 | /// An event is to be signalled periodically at a specified interval from the current time.\r | |
458 | ///\r | |
959ccb23 | 459 | TimerPeriodic,\r |
2a3f6a21 | 460 | ///\r |
461 | /// An event is to be signalled once at a specified interval from the current time.\r | |
462 | ///\r | |
959ccb23 | 463 | TimerRelative\r |
464 | } EFI_TIMER_DELAY;\r | |
465 | \r | |
466 | /**\r | |
467 | Sets the type of timer and the trigger time for a timer event.\r | |
468 | \r | |
469 | @param Event The timer event that is to be signaled at the specified time.\r | |
470 | @param Type The type of time that is specified in TriggerTime.\r | |
471 | @param TriggerTime The number of 100ns units until the timer expires.\r | |
e0c047a0 | 472 | A TriggerTime of 0 is legal.\r |
473 | If Type is TimerRelative and TriggerTime is 0, then the timer\r | |
474 | event will be signaled on the next timer tick.\r | |
475 | If Type is TimerPeriodic and TriggerTime is 0, then the timer\r | |
476 | event will be signaled on every timer tick.\r | |
959ccb23 | 477 | \r |
478 | @retval EFI_SUCCESS The event has been set to be signaled at the requested time.\r | |
479 | @retval EFI_INVALID_PARAMETER Event or Type is not valid.\r | |
480 | \r | |
481 | **/\r | |
482 | typedef\r | |
483 | EFI_STATUS\r | |
8b13229b | 484 | (EFIAPI *EFI_SET_TIMER)(\r |
959ccb23 | 485 | IN EFI_EVENT Event,\r |
486 | IN EFI_TIMER_DELAY Type,\r | |
487 | IN UINT64 TriggerTime\r | |
488 | );\r | |
489 | \r | |
490 | /**\r | |
491 | Signals an event.\r | |
492 | \r | |
493 | @param Event The event to signal.\r | |
494 | \r | |
495 | @retval EFI_SUCCESS The event has been signaled.\r | |
496 | \r | |
497 | **/\r | |
498 | typedef\r | |
499 | EFI_STATUS\r | |
8b13229b | 500 | (EFIAPI *EFI_SIGNAL_EVENT)(\r |
959ccb23 | 501 | IN EFI_EVENT Event\r |
502 | );\r | |
503 | \r | |
504 | /**\r | |
505 | Stops execution until an event is signaled.\r | |
506 | \r | |
507 | @param NumberOfEvents The number of events in the Event array.\r | |
508 | @param Event An array of EFI_EVENT.\r | |
509 | @param Index Pointer to the index of the event which satisfied the wait condition.\r | |
510 | \r | |
511 | @retval EFI_SUCCESS The event indicated by Index was signaled.\r | |
512 | @retval EFI_INVALID_PARAMETER 1) NumberOfEvents is 0.\r | |
513 | 2) The event indicated by Index is of type\r | |
514 | EVT_NOTIFY_SIGNAL.\r | |
515 | @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION.\r | |
516 | \r | |
517 | **/\r | |
518 | typedef\r | |
519 | EFI_STATUS\r | |
8b13229b | 520 | (EFIAPI *EFI_WAIT_FOR_EVENT)(\r |
959ccb23 | 521 | IN UINTN NumberOfEvents,\r |
522 | IN EFI_EVENT *Event,\r | |
523 | OUT UINTN *Index\r | |
524 | );\r | |
525 | \r | |
526 | /**\r | |
527 | Closes an event.\r | |
528 | \r | |
529 | @param Event The event to close.\r | |
530 | \r | |
531 | @retval EFI_SUCCESS The event has been closed.\r | |
532 | \r | |
533 | **/\r | |
534 | typedef\r | |
535 | EFI_STATUS\r | |
8b13229b | 536 | (EFIAPI *EFI_CLOSE_EVENT)(\r |
959ccb23 | 537 | IN EFI_EVENT Event\r |
538 | );\r | |
539 | \r | |
540 | /**\r | |
541 | Checks whether an event is in the signaled state.\r | |
542 | \r | |
543 | @param Event The event to check.\r | |
544 | \r | |
545 | @retval EFI_SUCCESS The event is in the signaled state.\r | |
546 | @retval EFI_NOT_READY The event is not in the signaled state.\r | |
547 | @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL.\r | |
548 | \r | |
549 | **/\r | |
550 | typedef\r | |
551 | EFI_STATUS\r | |
8b13229b | 552 | (EFIAPI *EFI_CHECK_EVENT)(\r |
959ccb23 | 553 | IN EFI_EVENT Event\r |
554 | );\r | |
555 | \r | |
556 | \r | |
557 | //\r | |
e0c047a0 | 558 | // Task priority level\r |
959ccb23 | 559 | //\r |
560 | #define TPL_APPLICATION 4\r | |
561 | #define TPL_CALLBACK 8\r | |
562 | #define TPL_NOTIFY 16\r | |
563 | #define TPL_HIGH_LEVEL 31\r | |
564 | \r | |
565 | \r | |
566 | /**\r | |
567 | Raises a task's priority level and returns its previous level.\r | |
568 | \r | |
569 | @param NewTpl The new task priority level.\r | |
570 | \r | |
e0c047a0 | 571 | @return Previous task priority level\r |
959ccb23 | 572 | \r |
573 | **/\r | |
574 | typedef\r | |
575 | EFI_TPL\r | |
8b13229b | 576 | (EFIAPI *EFI_RAISE_TPL)(\r |
959ccb23 | 577 | IN EFI_TPL NewTpl\r |
578 | );\r | |
579 | \r | |
580 | /**\r | |
581 | Restores a task's priority level to its previous value.\r | |
582 | \r | |
e0c047a0 | 583 | @param OldTpl The previous task priority level to restore.\r |
959ccb23 | 584 | \r |
585 | **/\r | |
586 | typedef\r | |
587 | VOID\r | |
8b13229b | 588 | (EFIAPI *EFI_RESTORE_TPL)(\r |
959ccb23 | 589 | IN EFI_TPL OldTpl\r |
590 | );\r | |
591 | \r | |
592 | /**\r | |
593 | Returns the value of a variable.\r | |
594 | \r | |
595 | @param VariableName A Null-terminated Unicode string that is the name of the\r | |
596 | vendor's variable.\r | |
597 | @param VendorGuid A unique identifier for the vendor.\r | |
598 | @param Attributes If not NULL, a pointer to the memory location to return the\r | |
599 | attributes bitmask for the variable.\r | |
600 | @param DataSize On input, the size in bytes of the return Data buffer.\r | |
601 | On output the size of data returned in Data.\r | |
602 | @param Data The buffer to return the contents of the variable.\r | |
603 | \r | |
e0c047a0 | 604 | @retval EFI_SUCCESS The function completed successfully.\r |
605 | @retval EFI_NOT_FOUND The variable was not found.\r | |
606 | @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.\r | |
607 | @retval EFI_INVALID_PARAMETER VariableName is NULL.\r | |
608 | @retval EFI_INVALID_PARAMETER VendorGuid is NULL.\r | |
609 | @retval EFI_INVALID_PARAMETER DataSize is NULL.\r | |
610 | @retval EFI_INVALID_PARAMETER The DataSize is not too small and Data is NULL.\r | |
611 | @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.\r | |
612 | @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.\r | |
959ccb23 | 613 | \r |
614 | **/\r | |
615 | typedef\r | |
616 | EFI_STATUS\r | |
8b13229b | 617 | (EFIAPI *EFI_GET_VARIABLE)(\r |
959ccb23 | 618 | IN CHAR16 *VariableName,\r |
619 | IN EFI_GUID *VendorGuid,\r | |
620 | OUT UINT32 *Attributes, OPTIONAL\r | |
621 | IN OUT UINTN *DataSize,\r | |
622 | OUT VOID *Data\r | |
623 | );\r | |
624 | \r | |
625 | /**\r | |
626 | Enumerates the current variable names.\r | |
627 | \r | |
628 | @param VariableNameSize The size of the VariableName buffer.\r | |
629 | @param VariableName On input, supplies the last VariableName that was returned\r | |
630 | by GetNextVariableName(). On output, returns the Nullterminated\r | |
631 | Unicode string of the current variable.\r | |
632 | @param VendorGuid On input, supplies the last VendorGuid that was returned by\r | |
633 | GetNextVariableName(). On output, returns the\r | |
634 | VendorGuid of the current variable.\r | |
635 | \r | |
636 | @retval EFI_SUCCESS The function completed successfully.\r | |
637 | @retval EFI_NOT_FOUND The next variable was not found.\r | |
638 | @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result.\r | |
e0c047a0 | 639 | @retval EFI_INVALID_PARAMETER VariableNameSize is NULL.\r |
640 | @retval EFI_INVALID_PARAMETER VariableName is NULL.\r | |
641 | @retval EFI_INVALID_PARAMETER VendorGuid is NULL.\r | |
959ccb23 | 642 | @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.\r |
643 | \r | |
644 | **/\r | |
645 | typedef\r | |
646 | EFI_STATUS\r | |
8b13229b | 647 | (EFIAPI *EFI_GET_NEXT_VARIABLE_NAME)(\r |
959ccb23 | 648 | IN OUT UINTN *VariableNameSize,\r |
649 | IN OUT CHAR16 *VariableName,\r | |
650 | IN OUT EFI_GUID *VendorGuid\r | |
651 | );\r | |
652 | \r | |
653 | /**\r | |
654 | Sets the value of a variable.\r | |
655 | \r | |
656 | @param VariableName A Null-terminated Unicode string that is the name of the\r | |
657 | vendor's variable.\r | |
658 | @param VendorGuid A unique identifier for the vendor.\r | |
659 | @param Attributes Attributes bitmask to set for the variable.\r | |
660 | @param DataSize The size in bytes of the Data buffer.\r | |
661 | @param Data The contents for the variable.\r | |
662 | \r | |
e0c047a0 | 663 | @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as\r |
664 | defined by the Attributes.\r | |
665 | @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied, or the\r | |
666 | DataSize exceeds the maximum allowed.\r | |
667 | @retval EFI_INVALID_PARAMETER VariableName is an empty Unicode string.\r | |
668 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.\r | |
669 | @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.\r | |
670 | @retval EFI_WRITE_PROTECTED The variable in question is read-only.\r | |
671 | @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted.\r | |
672 | @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.\r | |
673 | @retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.\r | |
959ccb23 | 674 | \r |
675 | **/\r | |
676 | typedef\r | |
677 | EFI_STATUS\r | |
8b13229b | 678 | (EFIAPI *EFI_SET_VARIABLE)(\r |
959ccb23 | 679 | IN CHAR16 *VariableName,\r |
680 | IN EFI_GUID *VendorGuid,\r | |
681 | IN UINT32 Attributes,\r | |
682 | IN UINTN DataSize,\r | |
683 | IN VOID *Data\r | |
684 | );\r | |
685 | \r | |
686 | \r | |
e0c047a0 | 687 | ///\r |
688 | /// This provides the capabilities of the\r | |
689 | /// real time clock device as exposed through the EFI interfaces.\r | |
690 | ///\r | |
959ccb23 | 691 | typedef struct {\r |
1bf79370 LG |
692 | ///\r |
693 | /// Provides the reporting resolution of the real-time clock device in\r | |
694 | /// counts per second. For a normal PC-AT CMOS RTC device, this\r | |
695 | /// value would be 1 Hz, or 1, to indicate that the device only reports\r | |
696 | /// the time to the resolution of 1 second.\r | |
697 | ///\r | |
00edb218 | 698 | UINT32 Resolution;\r |
1bf79370 LG |
699 | ///\r |
700 | /// Provides the timekeeping accuracy of the real-time clock in an\r | |
701 | /// error rate of 1E-6 parts per million. For a clock with an accuracy\r | |
702 | /// of 50 parts per million, the value in this field would be\r | |
703 | /// 50,000,000.\r | |
704 | ///\r | |
00edb218 | 705 | UINT32 Accuracy;\r |
1bf79370 LG |
706 | ///\r |
707 | Content-type: text/html ]>