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