]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib
authorStar Zeng <star.zeng@intel.com>
Tue, 17 Jan 2017 06:12:51 +0000 (14:12 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 20 Jan 2017 07:55:42 +0000 (15:55 +0800)
Use EfiEventGroupSignal from UefiLib and remove
EmptyCallbackFunction.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf

index ceb4f076e2a6fcf6d9baabdba2247bdc01760381..8858668543294830a193985847043f2dc6de018f 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
@@ -31,24 +31,6 @@ PlatformIntelBdsConstructor (
   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
-}\r
-\r
 //\r
 // BDS Platform Functions\r
 //\r
@@ -63,24 +45,10 @@ 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
+  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);\r
 }\r
 \r
 STATIC\r
index da428288fb9f815e3c98324d10e961037f7ab57b..1329c54a1c3a41e646b52fc36a2de06ef17022bb 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Head file for BDS Platform specific code\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -28,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PcdLib.h>\r
 #include <Library/GenericBdsLib.h>\r
 #include <Library/PlatformBdsLib.h>\r
+#include <Library/UefiLib.h>\r
 \r
 #include <Guid/GlobalVariable.h>\r
 #include <Guid/EventGroup.h>\r
index daa0d91a2f76b53326c7c591ad6461750aa6e48c..a27adacbc1c2290bdbdee7eacdb9250b2b086cd2 100644 (file)
@@ -2,7 +2,7 @@
 #  Implementation for PlatformBdsLib library class interfaces.\r
 #  using ARM Platform framework.\r
 #\r
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #  Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
@@ -50,6 +50,7 @@
   UefiBootServicesTableLib\r
   PcdLib\r
   GenericBdsLib\r
+  UefiLib\r
 \r
 [Guids]\r
   gEfiEndOfDxeEventGroupGuid\r