]>
Commit | Line | Data |
---|---|---|
23c98c94 | 1 | /** @file\r |
504214c4 LG |
2 | UEFI Event support functions and structure.\r |
3 | \r | |
cd5ebaa0 | 4 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r |
82f3edf2 | 5 | (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r |
cd5ebaa0 | 6 | This program and the accompanying materials\r |
23c98c94 | 7 | are licensed and made available under the terms and conditions of the BSD License\r |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
28a00297 | 13 | \r |
504214c4 | 14 | **/\r |
28a00297 | 15 | \r |
5f3232d7 | 16 | #ifndef __EVENT_H__\r |
17 | #define __EVENT_H__\r | |
28a00297 | 18 | \r |
ec90508b | 19 | \r |
28a00297 | 20 | #define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)\r |
ec90508b | 21 | extern UINTN gEventPending;\r |
22 | \r | |
82f3edf2 SEHM |
23 | ///\r |
24 | /// Set if Event is part of an event group\r | |
25 | ///\r | |
26 | #define EVT_EXFLAG_EVENT_GROUP 0x01\r | |
27 | ///\r | |
28 | /// Set if Event is registered on a protocol notify\r | |
29 | ///\r | |
30 | #define EVT_EXFLAG_EVENT_PROTOCOL_NOTIFICATION 0x02\r | |
28a00297 | 31 | \r |
32 | //\r | |
33 | // EFI_EVENT\r | |
34 | //\r | |
1ccdbf2a | 35 | \r |
36 | ///\r | |
37 | /// Timer event information\r | |
38 | ///\r | |
39 | typedef struct {\r | |
40 | LIST_ENTRY Link;\r | |
41 | UINT64 TriggerTime;\r | |
42 | UINT64 Period;\r | |
43 | } TIMER_EVENT_INFO;\r | |
44 | \r | |
f3f2e05d | 45 | #define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')\r |
28a00297 | 46 | typedef struct {\r |
47 | UINTN Signature;\r | |
48 | UINT32 Type;\r | |
49 | UINT32 SignalCount;\r | |
ec90508b | 50 | ///\r |
51 | /// Entry if the event is registered to be signalled\r | |
52 | ///\r | |
28a00297 | 53 | LIST_ENTRY SignalLink;\r |
ec90508b | 54 | ///\r |
55 | /// Notification information for this event\r | |
56 | ///\r | |
28a00297 | 57 | EFI_TPL NotifyTpl;\r |
58 | EFI_EVENT_NOTIFY NotifyFunction;\r | |
59 | VOID *NotifyContext;\r | |
60 | EFI_GUID EventGroup;\r | |
022c6d45 | 61 | LIST_ENTRY NotifyLink;\r |
82f3edf2 | 62 | UINT8 ExFlag;\r |
ec90508b | 63 | ///\r |
64 | /// A list of all runtime events\r | |
65 | ///\r | |
1ccdbf2a | 66 | EFI_RUNTIME_EVENT_ENTRY RuntimeData;\r |
67 | TIMER_EVENT_INFO Timer;\r | |
022c6d45 | 68 | } IEVENT;\r |
28a00297 | 69 | \r |
70 | //\r | |
71 | // Internal prototypes\r | |
72 | //\r | |
73 | \r | |
162ed594 | 74 | \r |
75 | /**\r | |
76 | Dispatches all pending events.\r | |
77 | \r | |
022c6d45 | 78 | @param Priority The task priority level of event notifications\r |
162ed594 | 79 | to dispatch\r |
80 | \r | |
81 | **/\r | |
28a00297 | 82 | VOID\r |
83 | CoreDispatchEventNotifies (\r | |
84 | IN EFI_TPL Priority\r | |
23c98c94 | 85 | );\r |
28a00297 | 86 | \r |
28a00297 | 87 | \r |
162ed594 | 88 | /**\r |
89 | Initializes timer support.\r | |
28a00297 | 90 | \r |
162ed594 | 91 | **/\r |
28a00297 | 92 | VOID\r |
93 | CoreInitializeTimer (\r | |
94 | VOID\r | |
23c98c94 | 95 | );\r |
28a00297 | 96 | \r |
28a00297 | 97 | #endif\r |