public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Oleksiy Yakovlev" <oleksiyy@ami.com>
To: <devel@edk2.groups.io>
Cc: <liming.gao@intel.com>, <michael.d.kinney@intel.com>,
	<Felixp@ami.com>, <oleksiyy@ami.com>, <robert@ami.com>
Subject: [PATCH 4/5] MdePkg: Added header file for Delayed Dispatch PPI
Date: Thu, 7 May 2020 15:03:09 -0400	[thread overview]
Message-ID: <20200507190310.38968-5-oleksiyy@ami.com> (raw)
In-Reply-To: <20200507190310.38968-1-oleksiyy@ami.com>

From: Robert Phelps <robert@ami.com>

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>
---
 MdePkg/Include/Ppi/DelayedDispatch.h | 79 ++++++++++++++++++++++++++++
 MdePkg/MdePkg.dec                    |  3 ++
 2 files changed, 82 insertions(+)
 create mode 100644 MdePkg/Include/Ppi/DelayedDispatch.h

diff --git a/MdePkg/Include/Ppi/DelayedDispatch.h b/MdePkg/Include/Ppi/DelayedDispatch.h
new file mode 100644
index 0000000000..4f8b11bcf6
--- /dev/null
+++ b/MdePkg/Include/Ppi/DelayedDispatch.h
@@ -0,0 +1,79 @@
+/** @file
+    Provide timed event service in PEI
+**/
+#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 c64cad75dd..6ab42b4bb5 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -942,6 +942,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 }}
-- 
2.24.1.windows.2


Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to American Megatrends (AMI).  This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited.  Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

  parent reply	other threads:[~2020-05-07 19:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 19:03 [PATCH 0/5] Add Definitions introduced in PI 1.7 and PI 1.7a Oleksiy Yakovlev
2020-05-07 19:03 ` [PATCH 1/5] MdePkg: New Status Codes Oleksiy Yakovlev
2020-05-11  5:13   ` [edk2-devel] " Zhiguang Liu
2020-05-07 19:03 ` [PATCH 2/5] MdePkg: Updates to PI 1.7 Revision numbers for Oleksiy Yakovlev
2020-05-11  5:20   ` [edk2-devel] " Zhiguang Liu
     [not found]   ` <160DE1B9669AE9D0.7726@groups.io>
2020-05-11  5:22     ` Zhiguang Liu
2020-05-07 19:03 ` [PATCH 3/5] MdePkg: EFI_MM_COMUNICATION2_PROTOCOL Oleksiy Yakovlev
2020-05-11  5:31   ` [edk2-devel] " Zhiguang Liu
2020-05-07 19:03 ` Oleksiy Yakovlev [this message]
2020-05-11  5:43   ` [edk2-devel] [PATCH 4/5] MdePkg: Added header file for Delayed Dispatch PPI Zhiguang Liu
2020-05-07 19:03 ` [PATCH 5/5] MdePkg: Update structures for MpServices Protocol Oleksiy Yakovlev
2020-05-11  5:00   ` [edk2-devel] " Ni, Ray
2020-05-15  4:56     ` Liming Gao
2020-05-15  5:33       ` Ni, Ray
     [not found]       ` <160F1CC8B9ACB17A.23170@groups.io>
2020-05-15  7:48         ` Ni, Ray
2020-05-15  7:50           ` Liming Gao
2020-05-11  6:05   ` Zhiguang Liu
2020-05-11 14:29 ` [edk2-devel] [PATCH 0/5] Add Definitions introduced in PI 1.7 and PI 1.7a Liming Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200507190310.38968-5-oleksiyy@ami.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox