]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Dxe/Event/Event.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[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
1436aea4
MK
13#define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)\r
14extern UINTN gEventPending;\r
ec90508b 15\r
82f3edf2
SEHM
16///\r
17/// Set if Event is part of an event group\r
18///\r
1436aea4 19#define EVT_EXFLAG_EVENT_GROUP 0x01\r
82f3edf2
SEHM
20///\r
21/// Set if Event is registered on a protocol notify\r
22///\r
1436aea4 23#define EVT_EXFLAG_EVENT_PROTOCOL_NOTIFICATION 0x02\r
28a00297 24\r
25//\r
26// EFI_EVENT\r
27//\r
1ccdbf2a 28\r
29///\r
30/// Timer event information\r
31///\r
32typedef struct {\r
1436aea4
MK
33 LIST_ENTRY Link;\r
34 UINT64 TriggerTime;\r
35 UINT64 Period;\r
1ccdbf2a 36} TIMER_EVENT_INFO;\r
37\r
1436aea4 38#define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')\r
28a00297 39typedef struct {\r
1436aea4
MK
40 UINTN Signature;\r
41 UINT32 Type;\r
42 UINT32 SignalCount;\r
ec90508b 43 ///\r
44 /// Entry if the event is registered to be signalled\r
45 ///\r
1436aea4 46 LIST_ENTRY SignalLink;\r
ec90508b 47 ///\r
48 /// Notification information for this event\r
49 ///\r
1436aea4
MK
50 EFI_TPL NotifyTpl;\r
51 EFI_EVENT_NOTIFY NotifyFunction;\r
52 VOID *NotifyContext;\r
53 EFI_GUID EventGroup;\r
54 LIST_ENTRY NotifyLink;\r
55 UINT8 ExFlag;\r
ec90508b 56 ///\r
57 /// A list of all runtime events\r
58 ///\r
1436aea4
MK
59 EFI_RUNTIME_EVENT_ENTRY RuntimeData;\r
60 TIMER_EVENT_INFO Timer;\r
022c6d45 61} IEVENT;\r
28a00297 62\r
63//\r
64// Internal prototypes\r
65//\r
66\r
162ed594 67/**\r
68 Dispatches all pending events.\r
69\r
022c6d45 70 @param Priority The task priority level of event notifications\r
162ed594 71 to dispatch\r
72\r
73**/\r
28a00297 74VOID\r
75CoreDispatchEventNotifies (\r
1436aea4 76 IN EFI_TPL Priority\r
23c98c94 77 );\r
28a00297 78\r
162ed594 79/**\r
80 Initializes timer support.\r
28a00297 81\r
162ed594 82**/\r
28a00297 83VOID\r
84CoreInitializeTimer (\r
85 VOID\r
23c98c94 86 );\r
28a00297 87\r
28a00297 88#endif\r