]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | EFI Delayed Dispatch PPI as defined in the PI 1.7 Specification\r | |
3 | \r | |
4 | Provide timed event service in PEI\r | |
5 | \r | |
6 | Copyright (c) 2020, American Megatrends International LLC. All rights reserved.\r | |
7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
8 | **/\r | |
9 | \r | |
10 | #ifndef __DELAYED_DISPATCH_PPI_H__\r | |
11 | #define __DELAYED_DISPATCH_PPI_H__\r | |
12 | \r | |
13 | ///\r | |
14 | /// Global ID for EFI_DELAYED_DISPATCH_PPI_GUID\r | |
15 | ///\r | |
16 | #define EFI_DELAYED_DISPATCH_PPI_GUID \\r | |
17 | { \\r | |
18 | 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6} } \\r | |
19 | }\r | |
20 | \r | |
21 | /**\r | |
22 | Delayed Dispatch function. This routine is called sometime after the required\r | |
23 | delay. Upon return, if NewDelay is 0, the function is unregistered. If NewDelay\r | |
24 | is not zero, this routine will be called again after the new delay period.\r | |
25 | \r | |
26 | @param[in,out] Context Pointer to Context. Can be updated by routine.\r | |
27 | @param[out] NewDelay The new delay in us. Leave at 0 to unregister callback.\r | |
28 | \r | |
29 | **/\r | |
30 | \r | |
31 | typedef\r | |
32 | VOID\r | |
33 | (EFIAPI *EFI_DELAYED_DISPATCH_FUNCTION)(\r | |
34 | IN OUT UINT64 *Context,\r | |
35 | OUT UINT32 *NewDelay\r | |
36 | );\r | |
37 | \r | |
38 | ///\r | |
39 | /// The forward declaration for EFI_DELAYED_DISPATCH_PPI\r | |
40 | ///\r | |
41 | \r | |
42 | typedef struct _EFI_DELAYED_DISPATCH_PPI EFI_DELAYED_DISPATCH_PPI;\r | |
43 | \r | |
44 | /**\r | |
45 | Register a callback to be called after a minimum delay has occurred.\r | |
46 | \r | |
47 | This service is the single member function of the EFI_DELAYED_DISPATCH_PPI\r | |
48 | \r | |
49 | @param This Pointer to the EFI_DELAYED_DISPATCH_PPI instance\r | |
50 | @param Function Function to call back\r | |
51 | @param Context Context data\r | |
52 | @param Delay Delay interval\r | |
53 | \r | |
54 | @retval EFI_SUCCESS Function successfully loaded\r | |
55 | @retval EFI_INVALID_PARAMETER One of the Arguments is not supported\r | |
56 | @retval EFI_OUT_OF_RESOURCES No more entries\r | |
57 | \r | |
58 | **/\r | |
59 | typedef\r | |
60 | EFI_STATUS\r | |
61 | (EFIAPI *EFI_DELAYED_DISPATCH_REGISTER)(\r | |
62 | IN EFI_DELAYED_DISPATCH_PPI *This,\r | |
63 | IN EFI_DELAYED_DISPATCH_FUNCTION Function,\r | |
64 | IN UINT64 Context,\r | |
65 | OUT UINT32 Delay\r | |
66 | );\r | |
67 | \r | |
68 | ///\r | |
69 | /// This PPI is a pointer to the Delayed Dispatch Service.\r | |
70 | /// This service will be published by the Pei Foundation. The PEI Foundation\r | |
71 | /// will use this service to relaunch a known function that requests a delayed\r | |
72 | /// execution.\r | |
73 | ///\r | |
74 | struct _EFI_DELAYED_DISPATCH_PPI {\r | |
75 | EFI_DELAYED_DISPATCH_REGISTER Register;\r | |
76 | };\r | |
77 | \r | |
78 | extern EFI_GUID gEfiPeiDelayedDispatchPpiGuid;\r | |
79 | \r | |
80 | #endif\r |