2008-05-21 03:40:12 +02:00
|
|
|
/** @file
|
2008-04-09 09:07:50 +02:00
|
|
|
UEFI Event support functions and structure.
|
|
|
|
|
2010-04-24 11:49:11 +02:00
|
|
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
2015-09-21 03:53:34 +02:00
|
|
|
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
2010-04-24 11:49:11 +02:00
|
|
|
This program and the accompanying materials
|
2008-05-21 03:40:12 +02:00
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
2007-07-04 12:51:54 +02:00
|
|
|
|
2008-04-09 09:07:50 +02:00
|
|
|
**/
|
2007-07-04 12:51:54 +02:00
|
|
|
|
2008-09-16 09:22:44 +02:00
|
|
|
#ifndef __EVENT_H__
|
|
|
|
#define __EVENT_H__
|
2007-07-04 12:51:54 +02:00
|
|
|
|
2008-09-23 09:35:34 +02:00
|
|
|
|
2007-07-04 12:51:54 +02:00
|
|
|
#define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)
|
2008-09-23 09:35:34 +02:00
|
|
|
extern UINTN gEventPending;
|
|
|
|
|
2015-09-21 03:53:34 +02:00
|
|
|
///
|
|
|
|
/// Set if Event is part of an event group
|
|
|
|
///
|
|
|
|
#define EVT_EXFLAG_EVENT_GROUP 0x01
|
|
|
|
///
|
|
|
|
/// Set if Event is registered on a protocol notify
|
|
|
|
///
|
|
|
|
#define EVT_EXFLAG_EVENT_PROTOCOL_NOTIFICATION 0x02
|
2007-07-04 12:51:54 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// EFI_EVENT
|
|
|
|
//
|
2010-01-19 07:42:21 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
/// Timer event information
|
|
|
|
///
|
|
|
|
typedef struct {
|
|
|
|
LIST_ENTRY Link;
|
|
|
|
UINT64 TriggerTime;
|
|
|
|
UINT64 Period;
|
|
|
|
} TIMER_EVENT_INFO;
|
|
|
|
|
2008-12-16 16:34:21 +01:00
|
|
|
#define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')
|
2007-07-04 12:51:54 +02:00
|
|
|
typedef struct {
|
|
|
|
UINTN Signature;
|
|
|
|
UINT32 Type;
|
|
|
|
UINT32 SignalCount;
|
2008-09-23 09:35:34 +02:00
|
|
|
///
|
|
|
|
/// Entry if the event is registered to be signalled
|
|
|
|
///
|
2007-07-04 12:51:54 +02:00
|
|
|
LIST_ENTRY SignalLink;
|
2008-09-23 09:35:34 +02:00
|
|
|
///
|
|
|
|
/// Notification information for this event
|
|
|
|
///
|
2007-07-04 12:51:54 +02:00
|
|
|
EFI_TPL NotifyTpl;
|
|
|
|
EFI_EVENT_NOTIFY NotifyFunction;
|
|
|
|
VOID *NotifyContext;
|
|
|
|
EFI_GUID EventGroup;
|
2008-07-24 04:54:45 +02:00
|
|
|
LIST_ENTRY NotifyLink;
|
2015-09-21 03:53:34 +02:00
|
|
|
UINT8 ExFlag;
|
2008-09-23 09:35:34 +02:00
|
|
|
///
|
|
|
|
/// A list of all runtime events
|
|
|
|
///
|
2010-01-19 07:42:21 +01:00
|
|
|
EFI_RUNTIME_EVENT_ENTRY RuntimeData;
|
|
|
|
TIMER_EVENT_INFO Timer;
|
2008-07-24 04:54:45 +02:00
|
|
|
} IEVENT;
|
2007-07-04 12:51:54 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// Internal prototypes
|
|
|
|
//
|
|
|
|
|
2008-05-09 09:08:30 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Dispatches all pending events.
|
|
|
|
|
2008-07-24 04:54:45 +02:00
|
|
|
@param Priority The task priority level of event notifications
|
2008-05-09 09:08:30 +02:00
|
|
|
to dispatch
|
|
|
|
|
|
|
|
**/
|
2007-07-04 12:51:54 +02:00
|
|
|
VOID
|
|
|
|
CoreDispatchEventNotifies (
|
|
|
|
IN EFI_TPL Priority
|
2008-05-21 03:40:12 +02:00
|
|
|
);
|
2007-07-04 12:51:54 +02:00
|
|
|
|
|
|
|
|
2008-05-09 09:08:30 +02:00
|
|
|
/**
|
|
|
|
Initializes timer support.
|
2007-07-04 12:51:54 +02:00
|
|
|
|
2008-05-09 09:08:30 +02:00
|
|
|
**/
|
2007-07-04 12:51:54 +02:00
|
|
|
VOID
|
|
|
|
CoreInitializeTimer (
|
|
|
|
VOID
|
2008-05-21 03:40:12 +02:00
|
|
|
);
|
2007-07-04 12:51:54 +02:00
|
|
|
|
|
|
|
#endif
|