]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
ArmVirtPkg: signal EndOxDxe event in PlatformBsdInit
[mirror_edk2.git] / ArmVirtPkg / Library / PlatformIntelBdsLib / IntelBdsPlatform.c
index 499cce5dcde68f72fec16ff0bb3d4a389bbfe281..13830cbe3665820bc88963c010f507681133869f 100644 (file)
@@ -24,6 +24,7 @@
 #include <Protocol/GraphicsOutput.h>\r
 #include <Protocol/PciIo.h>\r
 #include <Protocol/PciRootBridgeIo.h>\r
+#include <Guid/EventGroup.h>\r
 \r
 #include "IntelBdsPlatform.h"\r
 \r
@@ -118,6 +119,23 @@ STATIC PLATFORM_USB_KEYBOARD mUsbKeyboard = {
   }\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
+}\r
 \r
 //\r
 // BDS Platform Functions\r
@@ -133,6 +151,24 @@ PlatformBdsInit (
   VOID\r
   )\r
 {\r
+  EFI_EVENT           EndOfDxeEvent;\r
+  EFI_STATUS          Status;\r
+\r
+  //\r
+  // Signal EndOfDxe PI Event\r
+  //\r
+  Status = gBS->CreateEventEx (\r
+                  EVT_NOTIFY_SIGNAL,\r
+                  TPL_CALLBACK,\r
+                  EmptyCallbackFunction,\r
+                  NULL,\r
+                  &gEfiEndOfDxeEventGroupGuid,\r
+                  &EndOfDxeEvent\r
+                  );\r
+  if (!EFI_ERROR (Status)) {\r
+    gBS->SignalEvent (EndOfDxeEvent);\r
+    gBS->CloseEvent (EndOfDxeEvent);\r
+  }\r
 }\r
 \r
 \r