From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.4445.1578463696594948773 for ; Tue, 07 Jan 2020 22:08:16 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2020 22:08:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,408,1571727600"; d="scan'208";a="370860909" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 07 Jan 2020 22:08:08 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Jan 2020 22:08:07 -0800 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Jan 2020 22:08:07 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.197]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.210]) with mapi id 14.03.0439.000; Wed, 8 Jan 2020 14:08:05 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "vit9696@protonmail.com" CC: "Kinney, Michael D" , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Do not use CreateEventEx unless required Thread-Topic: [edk2-devel] [PATCH v2 1/1] MdePkg: Do not use CreateEventEx unless required Thread-Index: AQHVxUhTonaZY+QAZkOYt3l5VmQPBqfgSVGw Date: Wed, 8 Jan 2020 06:08:04 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E58D372@SHSMSX104.ccr.corp.intel.com> References: <20200107105028.65035-1-vit9696@protonmail.com> <20200107105028.65035-2-vit9696@protonmail.com> In-Reply-To: <20200107105028.65035-2-vit9696@protonmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao -----Original Message----- From: devel@edk2.groups.io On Behalf Of Vitaly Chept= sov via Groups.Io Sent: 2020=1B$BG/=1B(B1=1B$B7n=1B(B7=1B$BF|=1B(B 18:51 To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v2 1/1] MdePkg: Do not use CreateEventEx unles= s required REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2446 There are many firmwares in the wild not supporting CreateEventEx, includin= g devices less than 5 years old. Signed-off-by: Vitaly Cheptsov --- MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.i= nf | 3 --- MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf = | 4 ---- MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLibSegmentInfo= .inf | 3 --- MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf = | 3 --- MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortProtocol= .inf | 3 --- MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf = | 3 --- MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf = | 5 ----- MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c = | 3 +-- MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c = | 5 ++--- MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c = | 5 ++--- MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c = | 5 ++--- MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c = | 5 ++--- MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c = | 5 ++--- MdePkg/Library/UefiRuntimeLib/RuntimeLib.c = | 10 ++++------ 14 files changed, 15 insertions(+), 47 deletions(-) diff --git a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLib= SerialPort.inf b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebu= gLibSerialPort.inf index 655c1c14c1..31d169ad7c 100644 --- a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialP= ort.inf +++ b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSeri +++ alPort.inf @@ -41,9 +41,6 @@ [LibraryClasses] PrintLib SerialPortLib =20 -[Guids] - gEfiEventExitBootServicesGuid ## CONSUMES ## Eve= nt - [Pcd] gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSU= MES gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES diff --git a/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib= .inf b/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf index 45bfe9dc6f..8d2ba1d187 100644 --- a/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf +++ b/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf @@ -47,7 +47,3 @@ [LibraryClasses] =20 [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress ## CONSUMES - -[Guids] - gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event - diff --git a/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLi= bSegmentInfo.inf b/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSeg= mentLibSegmentInfo.inf index f6445f4abb..ae9f11b697 100644 --- a/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLibSegmen= tInfo.inf +++ b/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLibSeg +++ mentInfo.inf @@ -45,6 +45,3 @@ [LibraryClasses] MemoryAllocationLib DxeServicesTableLib UefiBootServicesTableLib - -[Guids] - gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event diff --git a/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf b/Mde= Pkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf index b577d52ac6..53bbc8ce3f 100644 --- a/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf +++ b/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf @@ -46,9 +46,6 @@ [LibraryClasses] PrintLib DebugPrintErrorLevelLib =20 -[Guids] - gEfiEventExitBootServicesGuid ## CONSUMES - [Pcd] gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CO= NSUMES gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebug= PortProtocol.inf b/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLi= bDebugPortProtocol.inf index ff09a12ce4..e12a1025c6 100644 --- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortPro= tocol.inf +++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPort +++ Protocol.inf @@ -46,9 +46,6 @@ [LibraryClasses] PrintLib DebugPrintErrorLevelLib =20 -[Guids] - gEfiEventExitBootServicesGuid ## CONSUMES - [Protocols] gEfiDebugPortProtocolGuid ## CONSUMES =20 diff --git a/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf b/Mde= Pkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf index 11f7594626..5ecb971a0a 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf +++ b/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf @@ -44,9 +44,6 @@ [LibraryClasses] PrintLib DebugPrintErrorLevelLib =20 -[Guids] - gEfiEventExitBootServicesGuid ## CONSUMES - [Pcd] gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue ## SOMETIMES_CONSUME= S gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask ## CONSUMES diff --git a/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf b/MdePkg/Libr= ary/UefiRuntimeLib/UefiRuntimeLib.inf index 5527f9f02f..cc4ee15110 100644 --- a/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf +++ b/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf @@ -39,8 +39,3 @@ [LibraryClasses] UefiBootServicesTableLib UefiRuntimeServicesTableLib DebugLib - -[Guids] - gEfiEventExitBootServicesGuid ## CONSUMES ## Event - gEfiEventVirtualAddressChangeGuid ## CONSUMES ## Event - diff --git a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c b/MdePk= g/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c index 862c6bff09..cc79843b1c 100644 --- a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c +++ b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c @@ -77,9 +77,8 @@ DxeRuntimeDebugLibSerialPortConstructor ( return Status; } =20 - return SystemTable->BootServices->CreateEventEx (EVT_NOTIFY_SIGNAL, + return SystemTable->BootServices->CreateEvent=20 + (EVT_SIGNAL_EXIT_BOOT_SERVICES, TPL_NOTIFY, ExitBootServicesEvent, N= ULL, - &gEfiEventExitBootServicesGuid, &mEfiExitBootServicesEvent); } =20 diff --git a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c b/MdePk= g/Library/DxeRuntimePciExpressLib/PciExpressLib.c index 6e784763be..7e5852e641 100644 --- a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c +++ b/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c @@ -124,12 +124,11 @@ DxeRuntimePciExpressLibConstructor ( // // Register SetVirtualAddressMap () notify function // - Status =3D gBS->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + Status =3D gBS->CreateEvent ( + EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, TPL_NOTIFY, DxeRuntimePciExpressLibVirtualNotify, NULL, - &gEfiEventVirtualAddressChangeGuid, &mDxeRuntimePciExpressLibVirtualNotifyEvent ); ASSERT_EFI_ERROR (Status); diff --git a/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLi= b.c b/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c index 2f503ecffe..b0dbdec0cf 100644 --- a/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c +++ b/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c @@ -109,12 +109,11 @@ DxeRuntimePciSegmentLibConstructor ( // // Register SetVirtualAddressMap () notify function // - Status =3D gBS->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + Status =3D gBS->CreateEvent ( + EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, TPL_NOTIFY, DxeRuntimePciSegmentLibVirtualNotify, NULL, - &gEfiEventVirtualAddressChangeGuid, &mDxeRuntimePciSegmentLibVirtualNotifyEvent ); ASSERT_EFI_ERROR (Status); diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c b/MdeP= kg/Library/UefiDebugLibConOut/DebugLibConstructor.c index ed73f92818..b4ac17cf55 100644 --- a/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c +++ b/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c @@ -64,12 +64,11 @@ DxeDebugLibConstructor( { mDebugST =3D SystemTable; =20 - SystemTable->BootServices->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + SystemTable->BootServices->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, TPL_NOTIFY, ExitBootServicesCallback, NULL, - &gEfiEventExitBootServicesGuid, &mExitBootServicesEvent ); =20 diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstruct= or.c b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c index 6ea0912f2b..96fc1c422f 100644 --- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c +++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c @@ -64,12 +64,11 @@ DxeDebugLibConstructor( { mDebugBS =3D SystemTable->BootServices; =20 - mDebugBS->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + mDebugBS->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, TPL_NOTIFY, ExitBootServicesCallback, NULL, - &gEfiEventExitBootServicesGuid, &mExitBootServicesEvent ); =20 diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c b/MdeP= kg/Library/UefiDebugLibStdErr/DebugLibConstructor.c index ed73f92818..b4ac17cf55 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c +++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c @@ -64,12 +64,11 @@ DxeDebugLibConstructor( { mDebugST =3D SystemTable; =20 - SystemTable->BootServices->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + SystemTable->BootServices->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, TPL_NOTIFY, ExitBootServicesCallback, NULL, - &gEfiEventExitBootServicesGuid, &mExitBootServicesEvent ); =20 diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c b/MdePkg/Library/Ue= fiRuntimeLib/RuntimeLib.c index 933e0099ce..a2eadafac8 100644 --- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c +++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c @@ -93,23 +93,21 @@ RuntimeDriverLibConstruct ( // // Register SetVirtualAddressMap () notify function // - Status =3D gBS->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + Status =3D gBS->CreateEvent ( + EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, TPL_NOTIFY, RuntimeLibVirtualNotifyEvent, NULL, - &gEfiEventVirtualAddressChangeGuid, &mEfiVirtualNotifyEvent ); =20 ASSERT_EFI_ERROR (Status); =20 - Status =3D gBS->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + Status =3D gBS->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, TPL_NOTIFY, RuntimeLibExitBootServicesEvent, NULL, - &gEfiEventExitBootServicesGuid, &mEfiExitBootServicesEvent ); =20 -- 2.21.0 (Apple Git-122.2) -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52980): https://edk2.groups.io/g/devel/message/52980 Mute This Topic: https://groups.io/mt/69499713/1759384 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D