public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Robert Phelps" <robert@ami.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "michael.d.kinney@intel.com" <michael.d.kinney@intel.com>,
	"gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>,
	"zhiguang.liu@intel.com" <zhiguang.liu@intel.com>
Subject: [PATCH v2 2/2] MdePkg: Added Call for AfterReadyToBoot Event
Date: Thu, 12 Jan 2023 20:07:09 +0000	[thread overview]
Message-ID: <20230112200650.929-3-robert@ami.com> (raw)
In-Reply-To: <20230112200650.929-1-robert@ami.com>

In the function EfiSignalEventReadyToBoot, Code was added to also create, signal, and close the AfterReadyToBoot event.





Cc: Michael D Kinney <michael.d.kinney@intel.com>

Cc: Liming Gao <gaoliming@byosoft.com.cn>

Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Signed-off-by: Robert Phelps <robert@ami.com>
---
 MdePkg/Library/UefiLib/UefiLib.inf    |  1 +
 MdePkg/Library/UefiLib/UefiNotTiano.c | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/MdePkg/Library/UefiLib/UefiLib.inf b/MdePkg/Library/UefiLib/UefiLib.inf
index 01ed92092d..3aced47d2e 100644
--- a/MdePkg/Library/UefiLib/UefiLib.inf
+++ b/MdePkg/Library/UefiLib/UefiLib.inf
@@ -56,6 +56,7 @@


 [Guids]

   gEfiEventReadyToBootGuid                      ## SOMETIMES_CONSUMES  ## Event

+  gEfiEventAfterReadyToBootGuid                 ## SOMETIMES_CONSUMES  ## Event

   gEfiEventLegacyBootGuid                       ## SOMETIMES_CONSUMES  ## Event

   gEfiGlobalVariableGuid                        ## SOMETIMES_CONSUMES  ## Variable

   gEfiAcpi20TableGuid                           ## SOMETIMES_CONSUMES  ## SystemTable

diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c
index d84e91fd01..f8f7406f3a 100644
--- a/MdePkg/Library/UefiLib/UefiNotTiano.c
+++ b/MdePkg/Library/UefiLib/UefiNotTiano.c
@@ -222,12 +222,26 @@ EfiSignalEventReadyToBoot (
 {

   EFI_STATUS  Status;

   EFI_EVENT   ReadyToBootEvent;

+  EFI_EVENT   AfterReadyToBootEvent;



   Status = EfiCreateEventReadyToBoot (&ReadyToBootEvent);

   if (!EFI_ERROR (Status)) {

     gBS->SignalEvent (ReadyToBootEvent);

     gBS->CloseEvent (ReadyToBootEvent);

   }

+

+  Status = gBS->CreateEventEx (

+                EVT_NOTIFY_SIGNAL,

+                TPL_CALLBACK,

+                EfiEventEmptyFunction,

+                NULL,

+                &gEfiEventAfterReadyToBootGuid,

+                AfterReadyToBootEvent

+                );

+  if (!EFI_ERROR (Status)) {

+    gBS->SignalEvent (AfterReadyToBootEvent);

+    gBS->CloseEvent (AfterReadyToBootEvent);

+  }

 }



 /**

--
2.36.1.windows.1
-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:[~2023-01-12 20:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 20:07 [PATCH v2 0/2] Added AfterReadyToBoot Event Robert Phelps
2023-01-12 20:07 ` [PATCH v2 1/2] MdePkg: Add After Ready To Boot Event Definition from UEFI 2.9 Robert Phelps
2023-01-12 20:07 ` Robert Phelps [this message]
2023-01-29  6:10 ` 回复: [PATCH v2 0/2] Added AfterReadyToBoot Event gaoliming

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=20230112200650.929-3-robert@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