diff mbox

[edk2,5/6] ArmVirtPkg/PlatformIntelBdsLib: rebase to EfiEventGroupSignal

Message ID 1458667268-23242-6-git-send-email-lersek@redhat.com
State New
Headers show

Commit Message

Laszlo Ersek March 22, 2016, 5:21 p.m. UTC
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  1 +
 ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 34 +-------------------
 ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c       |  1 -
 3 files changed, 2 insertions(+), 34 deletions(-)

-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ard Biesheuvel March 22, 2016, 5:22 p.m. UTC | #1
On 22 March 2016 at 18:21, Laszlo Ersek <lersek@redhat.com> wrote:
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com>


Quickly-acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h |  1 +

>  ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 34 +-------------------

>  ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c       |  1 -

>  3 files changed, 2 insertions(+), 34 deletions(-)

>

> diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h

> index 3d29b0d099ce..190ce9b294b0 100644

> --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h

> +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h

> @@ -22,6 +22,7 @@

>  #include <Library/DevicePathLib.h>

>  #include <Library/MemoryAllocationLib.h>

>  #include <Library/UefiBootServicesTableLib.h>

> +#include <Library/UefiLib.h>

>  #include <Library/UefiRuntimeServicesTableLib.h>

>

>  VOID

> diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c

> index b242a293a103..9267a188e810 100644

> --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c

> +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c

> @@ -121,24 +121,6 @@ STATIC PLATFORM_USB_KEYBOARD mUsbKeyboard = {

>    }

>  };

>

> -/**

> -  An empty function to pass error checking of CreateEventEx ().

> -

> -  @param  Event                 Event whose notification function is being invoked.

> -  @param  Context               Pointer to the notification function's context,

> -                                which is implementation-dependent.

> -

> -**/

> -STATIC

> -VOID

> -EFIAPI

> -EmptyCallbackFunction (

> -  IN EFI_EVENT                Event,

> -  IN VOID                     *Context

> -  )

> -{

> -}

> -

>  //

>  // BDS Platform Functions

>  //

> @@ -153,24 +135,10 @@ PlatformBdsInit (

>    VOID

>    )

>  {

> -  EFI_EVENT           EndOfDxeEvent;

> -  EFI_STATUS          Status;

> -

>    //

>    // Signal EndOfDxe PI Event

>    //

> -  Status = gBS->CreateEventEx (

> -                  EVT_NOTIFY_SIGNAL,

> -                  TPL_CALLBACK,

> -                  EmptyCallbackFunction,

> -                  NULL,

> -                  &gEfiEndOfDxeEventGroupGuid,

> -                  &EndOfDxeEvent

> -                  );

> -  if (!EFI_ERROR (Status)) {

> -    gBS->SignalEvent (EndOfDxeEvent);

> -    gBS->CloseEvent (EndOfDxeEvent);

> -  }

> +  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);

>  }

>

>

> diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c

> index c48f4767ad8f..402db97a80a7 100644

> --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c

> +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c

> @@ -20,7 +20,6 @@

>  #include <Guid/FileSystemVolumeLabelInfo.h>

>  #include <Library/PrintLib.h>

>  #include <Library/QemuFwCfgLib.h>

> -#include <Library/UefiLib.h>

>  #include <Protocol/DevicePath.h>

>  #include <Protocol/LoadedImage.h>

>  #include <Protocol/SimpleFileSystem.h>

> --

> 1.8.3.1

>

>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
index 3d29b0d099ce..190ce9b294b0 100644
--- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
+++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
@@ -22,6 +22,7 @@ 
 #include <Library/DevicePathLib.h>
 #include <Library/MemoryAllocationLib.h>
 #include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiLib.h>
 #include <Library/UefiRuntimeServicesTableLib.h>
 
 VOID
diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
index b242a293a103..9267a188e810 100644
--- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
+++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
@@ -121,24 +121,6 @@  STATIC PLATFORM_USB_KEYBOARD mUsbKeyboard = {
   }
 };
 
-/**
-  An empty function to pass error checking of CreateEventEx ().
-
-  @param  Event                 Event whose notification function is being invoked.
-  @param  Context               Pointer to the notification function's context,
-                                which is implementation-dependent.
-
-**/
-STATIC
-VOID
-EFIAPI
-EmptyCallbackFunction (
-  IN EFI_EVENT                Event,
-  IN VOID                     *Context
-  )
-{
-}
-
 //
 // BDS Platform Functions
 //
@@ -153,24 +135,10 @@  PlatformBdsInit (
   VOID
   )
 {
-  EFI_EVENT           EndOfDxeEvent;
-  EFI_STATUS          Status;
-
   //
   // Signal EndOfDxe PI Event
   //
-  Status = gBS->CreateEventEx (
-                  EVT_NOTIFY_SIGNAL,
-                  TPL_CALLBACK,
-                  EmptyCallbackFunction,
-                  NULL,
-                  &gEfiEndOfDxeEventGroupGuid,
-                  &EndOfDxeEvent
-                  );
-  if (!EFI_ERROR (Status)) {
-    gBS->SignalEvent (EndOfDxeEvent);
-    gBS->CloseEvent (EndOfDxeEvent);
-  }
+  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);
 }
 
 
diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c
index c48f4767ad8f..402db97a80a7 100644
--- a/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c
+++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/QemuKernel.c
@@ -20,7 +20,6 @@ 
 #include <Guid/FileSystemVolumeLabelInfo.h>
 #include <Library/PrintLib.h>
 #include <Library/QemuFwCfgLib.h>
-#include <Library/UefiLib.h>
 #include <Protocol/DevicePath.h>
 #include <Protocol/LoadedImage.h>
 #include <Protocol/SimpleFileSystem.h>