]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Dxe/Event/Event.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Event / Event.h
CommitLineData
23c98c94 1/** @file\r
504214c4
LG
2 UEFI Event support functions and structure.\r
3\r
cd5ebaa0 4Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
82f3edf2 5(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
9d510e61 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
28a00297 7\r
504214c4 8**/\r
28a00297 9\r
5f3232d7 10#ifndef __EVENT_H__\r
11#define __EVENT_H__\r
28a00297 12\r
ec90508b 13\r
28a00297 14#define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)\r
ec90508b 15extern UINTN gEventPending;\r
16\r
82f3edf2
SEHM
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
28a00297 25\r
26//\r
27// EFI_EVENT\r
28//\r
1ccdbf2a 29\r
30///\r
31/// Timer event information\r
32///\r
33typedef struct {\r
34 LIST_ENTRY Link;\r
35 UINT64 TriggerTime;\r
36 UINT64 Period;\r
37} TIMER_EVENT_INFO;\r
38\r
f3f2e05d 39#define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')\r
28a00297 40typedef struct {\r
41 UINTN Signature;\r
42 UINT32 Type;\r
43 UINT32 SignalCount;\r
ec90508b 44 ///\r
45 /// Entry if the event is registered to be signalled\r
46 ///\r
28a00297 47 LIST_ENTRY SignalLink;\r
ec90508b 48 ///\r
49 /// Notification information for this event\r
50 ///\r
28a00297 51 EFI_TPL NotifyTpl;\r
52 EFI_EVENT_NOTIFY NotifyFunction;\r
53 VOID *NotifyContext;\r
54 EFI_GUID EventGroup;\r
022c6d45 55 LIST_ENTRY NotifyLink;\r
82f3edf2 56 UINT8 ExFlag;\r
ec90508b 57 ///\r
58 /// A list of all runtime events\r
59 ///\r
1ccdbf2a 60 EFI_RUNTIME_EVENT_ENTRY RuntimeData;\r
61 TIMER_EVENT_INFO Timer;\r
022c6d45 62} IEVENT;\r
28a00297 63\r
64//\r
65// Internal prototypes\r
66//\r
67\r
162ed594 68\r
69/**\r
70 Dispatches all pending events.\r
71\r
022c6d45 72 @param Priority The task priority level of event notifications\r
162ed594 73 to dispatch\r
74\r
75**/\r
28a00297 76VOID\r
77CoreDispatchEventNotifies (\r
78 IN EFI_TPL Priority\r
23c98c94 79 );\r
28a00297 80\r
28a00297 81\r
162ed594 82/**\r
83 Initializes timer support.\r
28a00297 84\r
162ed594 85**/\r
28a00297 86VOID\r
87CoreInitializeTimer (\r
88 VOID\r
23c98c94 89 );\r
28a00297 90\r
28a00297 91#endif\r