Parcourir la source

MdePkg: Added Call for AfterReadyToBoot Event

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>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Robert Phelps il y a 1 an
Parent
commit
38da9606f7
2 fichiers modifiés avec 15 ajouts et 0 suppressions
  1. 1 0
      MdePkg/Library/UefiLib/UefiLib.inf
  2. 14 0
      MdePkg/Library/UefiLib/UefiNotTiano.c

+ 1 - 0
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

+ 14 - 0
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);
+  }
 }
 
 /**