mirror of https://github.com/acidanthera/audk.git
MdePkg: Do not use CreateEventEx unless required
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2446 There are many firmwares in the wild not supporting CreateEventEx, including devices less than 5 years old. Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
e18792566c
commit
df851da3ce
|
@ -77,9 +77,8 @@ DxeRuntimeDebugLibSerialPortConstructor (
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SystemTable->BootServices->CreateEventEx (EVT_NOTIFY_SIGNAL,
|
return SystemTable->BootServices->CreateEvent (EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
TPL_NOTIFY, ExitBootServicesEvent, NULL,
|
TPL_NOTIFY, ExitBootServicesEvent, NULL,
|
||||||
&gEfiEventExitBootServicesGuid,
|
|
||||||
&mEfiExitBootServicesEvent);
|
&mEfiExitBootServicesEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
PrintLib
|
PrintLib
|
||||||
SerialPortLib
|
SerialPortLib
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiEventExitBootServicesGuid ## CONSUMES ## Event
|
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUMES
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
|
||||||
|
|
|
@ -47,7 +47,3 @@
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event
|
|
||||||
|
|
||||||
|
|
|
@ -124,12 +124,11 @@ DxeRuntimePciExpressLibConstructor (
|
||||||
//
|
//
|
||||||
// Register SetVirtualAddressMap () notify function
|
// Register SetVirtualAddressMap () notify function
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
DxeRuntimePciExpressLibVirtualNotify,
|
DxeRuntimePciExpressLibVirtualNotify,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventVirtualAddressChangeGuid,
|
|
||||||
&mDxeRuntimePciExpressLibVirtualNotifyEvent
|
&mDxeRuntimePciExpressLibVirtualNotifyEvent
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
|
@ -109,12 +109,11 @@ DxeRuntimePciSegmentLibConstructor (
|
||||||
//
|
//
|
||||||
// Register SetVirtualAddressMap () notify function
|
// Register SetVirtualAddressMap () notify function
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
DxeRuntimePciSegmentLibVirtualNotify,
|
DxeRuntimePciSegmentLibVirtualNotify,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventVirtualAddressChangeGuid,
|
|
||||||
&mDxeRuntimePciSegmentLibVirtualNotifyEvent
|
&mDxeRuntimePciSegmentLibVirtualNotifyEvent
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
|
@ -45,6 +45,3 @@
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
DxeServicesTableLib
|
DxeServicesTableLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event
|
|
||||||
|
|
|
@ -64,12 +64,11 @@ DxeDebugLibConstructor(
|
||||||
{
|
{
|
||||||
mDebugST = SystemTable;
|
mDebugST = SystemTable;
|
||||||
|
|
||||||
SystemTable->BootServices->CreateEventEx (
|
SystemTable->BootServices->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
ExitBootServicesCallback,
|
ExitBootServicesCallback,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventExitBootServicesGuid,
|
|
||||||
&mExitBootServicesEvent
|
&mExitBootServicesEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,6 @@
|
||||||
PrintLib
|
PrintLib
|
||||||
DebugPrintErrorLevelLib
|
DebugPrintErrorLevelLib
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiEventExitBootServicesGuid ## CONSUMES
|
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUMES
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
|
||||||
|
|
|
@ -64,12 +64,11 @@ DxeDebugLibConstructor(
|
||||||
{
|
{
|
||||||
mDebugBS = SystemTable->BootServices;
|
mDebugBS = SystemTable->BootServices;
|
||||||
|
|
||||||
mDebugBS->CreateEventEx (
|
mDebugBS->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
ExitBootServicesCallback,
|
ExitBootServicesCallback,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventExitBootServicesGuid,
|
|
||||||
&mExitBootServicesEvent
|
&mExitBootServicesEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,6 @@
|
||||||
PrintLib
|
PrintLib
|
||||||
DebugPrintErrorLevelLib
|
DebugPrintErrorLevelLib
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiEventExitBootServicesGuid ## CONSUMES
|
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiDebugPortProtocolGuid ## CONSUMES
|
gEfiDebugPortProtocolGuid ## CONSUMES
|
||||||
|
|
||||||
|
|
|
@ -64,12 +64,11 @@ DxeDebugLibConstructor(
|
||||||
{
|
{
|
||||||
mDebugST = SystemTable;
|
mDebugST = SystemTable;
|
||||||
|
|
||||||
SystemTable->BootServices->CreateEventEx (
|
SystemTable->BootServices->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
ExitBootServicesCallback,
|
ExitBootServicesCallback,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventExitBootServicesGuid,
|
|
||||||
&mExitBootServicesEvent
|
&mExitBootServicesEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
PrintLib
|
PrintLib
|
||||||
DebugPrintErrorLevelLib
|
DebugPrintErrorLevelLib
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiEventExitBootServicesGuid ## CONSUMES
|
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUMES
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES
|
||||||
|
|
|
@ -93,23 +93,21 @@ RuntimeDriverLibConstruct (
|
||||||
//
|
//
|
||||||
// Register SetVirtualAddressMap () notify function
|
// Register SetVirtualAddressMap () notify function
|
||||||
//
|
//
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
RuntimeLibVirtualNotifyEvent,
|
RuntimeLibVirtualNotifyEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventVirtualAddressChangeGuid,
|
|
||||||
&mEfiVirtualNotifyEvent
|
&mEfiVirtualNotifyEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = gBS->CreateEventEx (
|
Status = gBS->CreateEvent (
|
||||||
EVT_NOTIFY_SIGNAL,
|
EVT_SIGNAL_EXIT_BOOT_SERVICES,
|
||||||
TPL_NOTIFY,
|
TPL_NOTIFY,
|
||||||
RuntimeLibExitBootServicesEvent,
|
RuntimeLibExitBootServicesEvent,
|
||||||
NULL,
|
NULL,
|
||||||
&gEfiEventExitBootServicesGuid,
|
|
||||||
&mEfiExitBootServicesEvent
|
&mEfiExitBootServicesEvent
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,3 @@
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiRuntimeServicesTableLib
|
UefiRuntimeServicesTableLib
|
||||||
DebugLib
|
DebugLib
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiEventExitBootServicesGuid ## CONSUMES ## Event
|
|
||||||
gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue