summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorRobert Phelps <robert@ami.com>2020-05-12 04:24:12 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-05-15 08:06:09 +0000
commit4ac245767341d9203b5b35b26d091a7f5e8534f9 (patch)
treed808a83b325ab246038e075fac329e4f937d6800 /MdePkg
parent93ddc0d133ee793101a2bc3ce587f275b3f11915 (diff)
downloadedk2-4ac245767341d9203b5b35b26d091a7f5e8534f9.tar.gz
edk2-4ac245767341d9203b5b35b26d091a7f5e8534f9.tar.bz2
edk2-4ac245767341d9203b5b35b26d091a7f5e8534f9.zip
MdePkg: Added header file for Delayed Dispatch PPI
Created new header file for the new EFI_DELAYED_DISPATCH_PPI PPI (PI 1.7 Mantis 1891) Signed-off-by: Robert Phelps <robert@ami.com> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Ppi/DelayedDispatch.h85
-rw-r--r--MdePkg/MdePkg.dec3
2 files changed, 88 insertions, 0 deletions
diff --git a/MdePkg/Include/Ppi/DelayedDispatch.h b/MdePkg/Include/Ppi/DelayedDispatch.h
new file mode 100644
index 0000000000..195c5a36a4
--- /dev/null
+++ b/MdePkg/Include/Ppi/DelayedDispatch.h
@@ -0,0 +1,85 @@
+/** @file
+ EFI Delayed Dispatch PPI as defined in the PI 1.7 Specification
+
+ Provide timed event service in PEI
+
+ Copyright (c) 2020, American Megatrends International LLC. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef __DELAYED_DISPATCH_PPI_H__
+#define __DELAYED_DISPATCH_PPI_H__
+
+///
+/// Global ID for EFI_DELAYED_DISPATCH_PPI_GUID
+///
+#define EFI_DELAYED_DISPATCH_PPI_GUID \
+ { \
+ 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6} } \
+ }
+
+
+/**
+ Delayed Dispatch function. This routine is called sometime after the required
+ delay. Upon return, if NewDelay is 0, the function is unregistered. If NewDelay
+ is not zero, this routine will be called again after the new delay period.
+
+ @param[in,out] Context Pointer to Context. Can be updated by routine.
+ @param[out] NewDelay The new delay in us. Leave at 0 to unregister callback.
+
+**/
+
+typedef
+VOID
+(EFIAPI *EFI_DELAYED_DISPATCH_FUNCTION) (
+ IN OUT UINT64 *Context,
+ OUT UINT32 *NewDelay
+ );
+
+
+///
+/// The forward declaration for EFI_DELAYED_DISPATCH_PPI
+///
+
+typedef struct _EFI_DELAYED_DISPATCH_PPI EFI_DELAYED_DISPATCH_PPI;
+
+
+/**
+Register a callback to be called after a minimum delay has occurred.
+
+This service is the single member function of the EFI_DELAYED_DISPATCH_PPI
+
+ @param This Pointer to the EFI_DELAYED_DISPATCH_PPI instance
+ @param Function Function to call back
+ @param Context Context data
+ @param Delay Delay interval
+
+ @retval EFI_SUCCESS Function successfully loaded
+ @retval EFI_INVALID_PARAMETER One of the Arguments is not supported
+ @retval EFI_OUT_OF_RESOURCES No more entries
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_DELAYED_DISPATCH_REGISTER)(
+ IN EFI_DELAYED_DISPATCH_PPI *This,
+ IN EFI_DELAYED_DISPATCH_FUNCTION Function,
+ IN UINT64 Context,
+ OUT UINT32 Delay
+ );
+
+
+///
+/// This PPI is a pointer to the Delayed Dispatch Service.
+/// This service will be published by the Pei Foundation. The PEI Foundation
+/// will use this service to relaunch a known function that requests a delayed
+/// execution.
+///
+struct _EFI_DELAYED_DISPATCH_PPI {
+ EFI_DELAYED_DISPATCH_REGISTER Register;
+};
+
+
+extern EFI_GUID gEfiPeiDelayedDispatchPpiGuid;
+
+#endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 86d0cd5f4e..4bc86b05a5 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -956,6 +956,9 @@
## Include/Ppi/PeiCoreFvLocation.h
gEfiPeiCoreFvLocationPpiGuid = { 0x52888eae, 0x5b10, 0x47d0, { 0xa8, 0x7f, 0xb8, 0x22, 0xab, 0xa0, 0xca, 0xf4 }}
+ ## Include/Ppi/DelayedDispatch.h
+ gEfiPeiDelayedDispatchPpiGuid = { 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }}
+
[Protocols]
## Include/Protocol/Pcd.h
gPcdProtocolGuid = { 0x11B34006, 0xD85B, 0x4D0A, { 0xA2, 0x90, 0xD5, 0xA5, 0x71, 0x31, 0x0E, 0xF7 }}