Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
-/**\r
- Empty callback function executed when the EndOfDxe event group is signaled.\r
-\r
- We only need this function because we'd like to signal EndOfDxe, and for that\r
- we need to create an event, with a callback function.\r
-\r
- @param[in] Event Event whose notification function is being invoked.\r
- @param[in] Context The pointer to the notification function's context, which\r
- is implementation-dependent.\r
-**/\r
-STATIC\r
-VOID\r
-EFIAPI\r
-OnEndOfDxe (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- )\r
-{\r
-}\r
-\r
-\r
/**\r
Save the S3 boot script.\r
\r
/**\r
Save the S3 boot script.\r
\r
{\r
EFI_STATUS Status;\r
EFI_BOOT_MODE BootMode;\r
{\r
EFI_STATUS Status;\r
EFI_BOOT_MODE BootMode;\r
- EFI_EVENT EndOfDxeEvent;\r
\r
DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n"));\r
\r
\r
DEBUG ((EFI_D_INFO, "PlatformBdsPolicyBehavior\n"));\r
\r
// installed after PCI enumeration completes, we must not trigger the S3 save\r
// earlier, hence we can't signal End-of-Dxe earlier.\r
//\r
// installed after PCI enumeration completes, we must not trigger the S3 save\r
// earlier, hence we can't signal End-of-Dxe earlier.\r
//\r
- Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_CALLBACK, OnEndOfDxe,\r
- NULL /* NotifyContext */, &gEfiEndOfDxeEventGroupGuid,\r
- &EndOfDxeEvent);\r
- if (!EFI_ERROR (Status)) {\r
- gBS->SignalEvent (EndOfDxeEvent);\r
- gBS->CloseEvent (EndOfDxeEvent);\r
- }\r
+ EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);\r
\r
if (QemuFwCfgS3Enabled ()) {\r
//\r
\r
if (QemuFwCfgS3Enabled ()) {\r
//\r