Hi Dionna,

I gave feedback about After Exit Boot Services event.

Why is an After Ready To Boot signal now part of this series?

Mike

> -----Original Message-----
> From: Dionna Glaze <dionnagl...@google.com>
> Sent: Tuesday, November 8, 2022 1:16 PM
> To: devel@edk2.groups.io
> Cc: Dionna Glaze <dionnagl...@google.com>; Kinney, Michael D 
> <michael.d.kin...@intel.com>; Ard Biesheuvel <a...@kernel.org>;
> Gerd Hoffman <kra...@redhat.com>; Yao, Jiewen <jiewen....@intel.com>
> Subject: [PATCH v2 4/4] MdePkg: Signal AfterReadyToBoot after ReadyToBoot
> 
> The Uefi v2.9 specification adds this event group in section 3.1.7,
> with its GUID defined in the Related Definitions section of
> EFI_BOOT_SERVICES.CreateEventEx() in chapter 7.
> 
> Cc: "Michael D Kinney" <michael.d.kin...@intel.com>
> Cc: Ard Biesheuvel <a...@kernel.org>
> Cc: Gerd Hoffman <kra...@redhat.com>
> Cc: Jiewen Yao <jiewen....@intel.com>
> 
> Signed-off-by: Dionna Glaze <dionnagl...@google.com>
> ---
>  MdePkg/Include/Library/UefiLib.h      |  2 ++
>  MdePkg/Library/UefiLib/UefiLib.inf    |  1 +
>  MdePkg/Library/UefiLib/UefiNotTiano.c | 18 ++++++++++++++++++
>  3 files changed, 21 insertions(+)
> 
> diff --git a/MdePkg/Include/Library/UefiLib.h 
> b/MdePkg/Include/Library/UefiLib.h
> index be7da7fdf7..2c3342351e 100644
> --- a/MdePkg/Include/Library/UefiLib.h
> +++ b/MdePkg/Include/Library/UefiLib.h
> @@ -890,6 +890,8 @@ UnicodeStringDisplayLength (
>  /**
>    Create, Signal, and Close the Ready to Boot event using 
> EfiSignalEventReadyToBoot().
> 
> +  If successful, then create, signal and close the After Ready to Boot event.
> +
>    This function abstracts the signaling of the Ready to Boot Event. The 
> Framework moved
>    from a proprietary to UEFI 2.0 based mechanism. This library abstracts the 
> caller
>    from how this event is created to prevent to code form having to change 
> with the
> diff --git a/MdePkg/Library/UefiLib/UefiLib.inf 
> b/MdePkg/Library/UefiLib/UefiLib.inf
> index 01ed92092d..5c4064eafa 100644
> --- a/MdePkg/Library/UefiLib/UefiLib.inf
> +++ b/MdePkg/Library/UefiLib/UefiLib.inf
> @@ -60,6 +60,7 @@
>    gEfiGlobalVariableGuid                        ## SOMETIMES_CONSUMES  ## 
> Variable
>    gEfiAcpi20TableGuid                           ## SOMETIMES_CONSUMES  ## 
> SystemTable
>    gEfiAcpi10TableGuid                           ## SOMETIMES_CONSUMES  ## 
> SystemTable
> +  gEfiEventAfterReadyToBootGuid                 ## SOMETIMES_CONSUMES  ## 
> Event
> 
>  [Protocols]
>    gEfiDriverBindingProtocolGuid                   ## SOMETIMES_PRODUCES
> diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c 
> b/MdePkg/Library/UefiLib/UefiNotTiano.c
> index d84e91fd01..04fe42f9f7 100644
> --- a/MdePkg/Library/UefiLib/UefiNotTiano.c
> +++ b/MdePkg/Library/UefiLib/UefiNotTiano.c
> @@ -208,6 +208,8 @@ EfiCreateEventReadyToBootEx (
>  /**
>    Create, Signal, and Close the Ready to Boot event using 
> EfiSignalEventReadyToBoot().
> 
> +  If successful, then create, signal and close the After Ready to Boot event.
> +
>    This function abstracts the signaling of the Ready to Boot Event. The 
> Framework moved
>    from a proprietary to UEFI 2.0 based mechanism. This library abstracts the 
> caller
>    from how this event is created to prevent to code form having to change 
> with the
> @@ -222,11 +224,27 @@ EfiSignalEventReadyToBoot (
>  {
>    EFI_STATUS  Status;
>    EFI_EVENT   ReadyToBootEvent;
> +  EFI_EVENT   AfterReadyToBootEvent;
> 
>    Status = EfiCreateEventReadyToBoot (&ReadyToBootEvent);
>    if (!EFI_ERROR (Status)) {
>      gBS->SignalEvent (ReadyToBootEvent);
>      gBS->CloseEvent (ReadyToBootEvent);
> +    return;
> +  }
> +
> +  /* Then immediately signal the after ready to boot event group */
> +  Status = gBS->CreateEventEx (
> +                  EVT_NOTIFY_SIGNAL,
> +                  TPL_CALLBACK,
> +                  EfiEventEmptyFunction,
> +                  NULL,
> +                  &gEfiEventAfterReadyToBootGuid,
> +                  AfterReadyToBootEvent
> +                  );
> +  if (!EFI_ERROR(Status)) {
> +    gBS->SignalEvent (AfterReadyToBootEvent);
> +    gBS->CloseEvent (AfterReadyToBootEvent);
>    }
>  }
> 
> --
> 2.38.1.431.g37b22c650d-goog



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#96142): https://edk2.groups.io/g/devel/message/96142
Mute This Topic: https://groups.io/mt/94900168/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to