From 38da9606f77842cdcdc231210c0369a6180c51a0 Mon Sep 17 00:00:00 2001 From: Robert Phelps Date: Thu, 22 Dec 2022 04:28:06 +0800 Subject: MdePkg: Added Call for AfterReadyToBoot Event In the function EfiSignalEventReadyToBoot, Code was added to also create, signal, and close the AfterReadyToBoot event. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Robert Phelps Reviewed-by: Liming Gao --- MdePkg/Library/UefiLib/UefiLib.inf | 1 + MdePkg/Library/UefiLib/UefiNotTiano.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) (limited to 'MdePkg') diff --git a/MdePkg/Library/UefiLib/UefiLib.inf b/MdePkg/Library/UefiLib/UefiLib.inf index 01ed920..3aced47 100644 --- a/MdePkg/Library/UefiLib/UefiLib.inf +++ b/MdePkg/Library/UefiLib/UefiLib.inf @@ -56,6 +56,7 @@ [Guids] gEfiEventReadyToBootGuid ## SOMETIMES_CONSUMES ## Event + gEfiEventAfterReadyToBootGuid ## SOMETIMES_CONSUMES ## Event gEfiEventLegacyBootGuid ## SOMETIMES_CONSUMES ## Event gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable gEfiAcpi20TableGuid ## SOMETIMES_CONSUMES ## SystemTable diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c index d84e91f..8c8d9b2 100644 --- a/MdePkg/Library/UefiLib/UefiNotTiano.c +++ b/MdePkg/Library/UefiLib/UefiNotTiano.c @@ -222,12 +222,26 @@ EfiSignalEventReadyToBoot ( { EFI_STATUS Status; EFI_EVENT ReadyToBootEvent; + EFI_EVENT AfterReadyToBootEvent; Status = EfiCreateEventReadyToBoot (&ReadyToBootEvent); if (!EFI_ERROR (Status)) { gBS->SignalEvent (ReadyToBootEvent); gBS->CloseEvent (ReadyToBootEvent); } + + Status = gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + EfiEventEmptyFunction, + NULL, + &gEfiEventAfterReadyToBootGuid, + &AfterReadyToBootEvent + ); + if (!EFI_ERROR (Status)) { + gBS->SignalEvent (AfterReadyToBootEvent); + gBS->CloseEvent (AfterReadyToBootEvent); + } } /** -- cgit v1.1