VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibEventTimer.c

Last change on this file was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 5.3 KB
Line 
1/** @file
2 Implementation of event and timer related services in the UEFI Boot Services table for use in unit tests.
3
4Copyright (c) Microsoft Corporation
5SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include "UnitTestUefiBootServicesTableLib.h"
10
11/**
12 Creates an event.
13
14 @param Type The type of event to create and its mode and
15 attributes
16 @param NotifyTpl The task priority level of event notifications
17 @param NotifyFunction Pointer to the events notification function
18 @param NotifyContext Pointer to the notification functions context
19 corresponds to parameter "Context" in the
20 notification function
21 @param Event Pointer to the newly created event if the call
22 succeeds undefined otherwise
23
24 @retval EFI_SUCCESS The event structure was created
25 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value
26 @retval EFI_OUT_OF_RESOURCES The event could not be allocated
27
28**/
29EFI_STATUS
30EFIAPI
31UnitTestCreateEvent (
32 IN UINT32 Type,
33 IN EFI_TPL NotifyTpl,
34 IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
35 IN VOID *NotifyContext, OPTIONAL
36 OUT EFI_EVENT *Event
37 )
38{
39 return EFI_NOT_AVAILABLE_YET;
40}
41
42/**
43 Sets the type of timer and the trigger time for a timer event.
44
45 @param UserEvent The timer event that is to be signaled at the
46 specified time
47 @param Type The type of time that is specified in
48 TriggerTime
49 @param TriggerTime The number of 100ns units until the timer
50 expires
51
52 @retval EFI_SUCCESS The event has been set to be signaled at the
53 requested time
54 @retval EFI_INVALID_PARAMETER Event or Type is not valid
55
56**/
57EFI_STATUS
58EFIAPI
59UnitTestSetTimer (
60 IN EFI_EVENT UserEvent,
61 IN EFI_TIMER_DELAY Type,
62 IN UINT64 TriggerTime
63 )
64{
65 return EFI_NOT_AVAILABLE_YET;
66}
67
68/**
69 Stops execution until an event is signaled.
70
71 @param NumberOfEvents The number of events in the UserEvents array
72 @param UserEvents An array of EFI_EVENT
73 @param UserIndex Pointer to the index of the event which
74 satisfied the wait condition
75
76 @retval EFI_SUCCESS The event indicated by Index was signaled.
77 @retval EFI_INVALID_PARAMETER The event indicated by Index has a notification
78 function or Event was not a valid type
79 @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION
80
81**/
82EFI_STATUS
83EFIAPI
84UnitTestWaitForEvent (
85 IN UINTN NumberOfEvents,
86 IN EFI_EVENT *UserEvents,
87 OUT UINTN *UserIndex
88 )
89{
90 return EFI_NOT_AVAILABLE_YET;
91}
92
93/**
94 Signals the event. Queues the event to be notified if needed.
95
96 @param UserEvent The event to signal .
97
98 @retval EFI_INVALID_PARAMETER Parameters are not valid.
99 @retval EFI_SUCCESS The event was signaled.
100
101**/
102EFI_STATUS
103EFIAPI
104UnitTestSignalEvent (
105 IN EFI_EVENT UserEvent
106 )
107{
108 return EFI_NOT_AVAILABLE_YET;
109}
110
111/**
112 Closes an event and frees the event structure.
113
114 @param UserEvent Event to close
115
116 @retval EFI_INVALID_PARAMETER Parameters are not valid.
117 @retval EFI_SUCCESS The event has been closed
118
119**/
120EFI_STATUS
121EFIAPI
122UnitTestCloseEvent (
123 IN EFI_EVENT UserEvent
124 )
125{
126 return EFI_NOT_AVAILABLE_YET;
127}
128
129/**
130 Check the status of an event.
131
132 @param UserEvent The event to check
133
134 @retval EFI_SUCCESS The event is in the signaled state
135 @retval EFI_NOT_READY The event is not in the signaled state
136 @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL
137
138**/
139EFI_STATUS
140EFIAPI
141UnitTestCheckEvent (
142 IN EFI_EVENT UserEvent
143 )
144{
145 return EFI_NOT_AVAILABLE_YET;
146}
147
148/**
149 Creates an event in a group.
150
151 @param Type The type of event to create and its mode and
152 attributes
153 @param NotifyTpl The task priority level of event notifications
154 @param NotifyFunction Pointer to the events notification function
155 @param NotifyContext Pointer to the notification functions context
156 corresponds to parameter "Context" in the
157 notification function
158 @param EventGroup GUID for EventGroup if NULL act the same as
159 gBS->CreateEvent().
160 @param Event Pointer to the newly created event if the call
161 succeeds undefined otherwise
162
163 @retval EFI_SUCCESS The event structure was created
164 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value
165 @retval EFI_OUT_OF_RESOURCES The event could not be allocated
166
167**/
168EFI_STATUS
169EFIAPI
170UnitTestCreateEventEx (
171 IN UINT32 Type,
172 IN EFI_TPL NotifyTpl,
173 IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
174 IN CONST VOID *NotifyContext, OPTIONAL
175 IN CONST EFI_GUID *EventGroup, OPTIONAL
176 OUT EFI_EVENT *Event
177 )
178{
179 return EFI_NOT_AVAILABLE_YET;
180}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette