]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | UEFI Event support functions and structure.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
5 | (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
9 | \r | |
10 | #ifndef __EVENT_H__\r | |
11 | #define __EVENT_H__\r | |
12 | \r | |
13 | \r | |
14 | #define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)\r | |
15 | extern UINTN gEventPending;\r | |
16 | \r | |
17 | ///\r | |
18 | /// Set if Event is part of an event group\r | |
19 | ///\r | |
20 | #define EVT_EXFLAG_EVENT_GROUP 0x01\r | |
21 | ///\r | |
22 | /// Set if Event is registered on a protocol notify\r | |
23 | ///\r | |
24 | #define EVT_EXFLAG_EVENT_PROTOCOL_NOTIFICATION 0x02\r | |
25 | \r | |
26 | //\r | |
27 | // EFI_EVENT\r | |
28 | //\r | |
29 | \r | |
30 | ///\r | |
31 | /// Timer event information\r | |
32 | ///\r | |
33 | typedef struct {\r | |
34 | LIST_ENTRY Link;\r | |
35 | UINT64 TriggerTime;\r | |
36 | UINT64 Period;\r | |
37 | } TIMER_EVENT_INFO;\r | |
38 | \r | |
39 | #define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')\r | |
40 | typedef struct {\r | |
41 | UINTN Signature;\r | |
42 | UINT32 Type;\r | |
43 | UINT32 SignalCount;\r | |
44 | ///\r | |
45 | /// Entry if the event is registered to be signalled\r | |
46 | ///\r | |
47 | LIST_ENTRY SignalLink;\r | |
48 | ///\r | |
49 | /// Notification information for this event\r | |
50 | ///\r | |
51 | EFI_TPL NotifyTpl;\r | |
52 | EFI_EVENT_NOTIFY NotifyFunction;\r | |
53 | VOID *NotifyContext;\r | |
54 | EFI_GUID EventGroup;\r | |
55 | LIST_ENTRY NotifyLink;\r | |
56 | UINT8 ExFlag;\r | |
57 | ///\r | |
58 | /// A list of all runtime events\r | |
59 | ///\r | |
60 | EFI_RUNTIME_EVENT_ENTRY RuntimeData;\r | |
61 | TIMER_EVENT_INFO Timer;\r | |
62 | } IEVENT;\r | |
63 | \r | |
64 | //\r | |
65 | // Internal prototypes\r | |
66 | //\r | |
67 | \r | |
68 | \r | |
69 | /**\r | |
70 | Dispatches all pending events.\r | |
71 | \r | |
72 | @param Priority The task priority level of event notifications\r | |
73 | to dispatch\r | |
74 | \r | |
75 | **/\r | |
76 | VOID\r | |
77 | CoreDispatchEventNotifies (\r | |
78 | IN EFI_TPL Priority\r | |
79 | );\r | |
80 | \r | |
81 | \r | |
82 | /**\r | |
83 | Initializes timer support.\r | |
84 | \r | |
85 | **/\r | |
86 | VOID\r | |
87 | CoreInitializeTimer (\r | |
88 | VOID\r | |
89 | );\r | |
90 | \r | |
91 | #endif\r |