]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Bds/Bds.c
ArmPlatformPkg/Bds: Signal EndOfDxe PI Event
[mirror_edk2.git] / ArmPlatformPkg / Bds / Bds.c
index e2f97307f64afa419e860488d5784fff073df2cc..b84faf91b653306f814791873107c875b03db7ed 100644 (file)
@@ -19,6 +19,8 @@
 \r
 #include <Protocol/Bds.h>\r
 \r
+#include <Guid/EventGroup.h>\r
+\r
 #define EFI_SET_TIMER_TO_SECOND   10000000\r
 \r
 STATIC\r
@@ -417,6 +419,25 @@ StartDefaultBootOnTimeout (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  An empty function to pass error checking of CreateEventEx ().\r
+\r
+  @param  Event                 Event whose notification function is being invoked.\r
+  @param  Context               Pointer to the notification function's context,\r
+                                which is implementation-dependent.\r
+\r
+**/\r
+STATIC\r
+VOID\r
+EFIAPI\r
+EmptyCallbackFunction (\r
+  IN EFI_EVENT                Event,\r
+  IN VOID                     *Context\r
+  )\r
+{\r
+  return;\r
+}\r
+\r
 /**\r
   This function uses policy data from the platform to determine what operating\r
   system or system utility should be loaded and invoked.  This function call\r
@@ -449,6 +470,22 @@ BdsEntry (
   UINT16             *BootNext;\r
   UINTN               BootNextSize;\r
   CHAR16              BootVariableName[9];\r
+  EFI_EVENT           EndOfDxeEvent;\r
+\r
+  //\r
+  // Signal EndOfDxe PI Event\r
+  //\r
+  Status = gBS->CreateEventEx (\r
+      EVT_NOTIFY_SIGNAL,\r
+      TPL_NOTIFY,\r
+      EmptyCallbackFunction,\r
+      NULL,\r
+      &gEfiEndOfDxeEventGroupGuid,\r
+      &EndOfDxeEvent\r
+      );\r
+  if (!EFI_ERROR (Status)) {\r
+    gBS->SignalEvent (EndOfDxeEvent);\r
+  }\r
 \r
   PERF_END   (NULL, "DXE", NULL, 0);\r
 \r