From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 79AD081F21 for ; Thu, 10 Nov 2016 08:04:34 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 10 Nov 2016 08:04:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,619,1473145200"; d="scan'208";a="2415167" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga002.jf.intel.com with ESMTP; 10 Nov 2016 08:04:31 -0800 Received: from orsmsx112.amr.corp.intel.com (10.22.240.13) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 10 Nov 2016 08:04:31 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.250]) by ORSMSX112.amr.corp.intel.com ([169.254.3.58]) with mapi id 14.03.0248.002; Thu, 10 Nov 2016 08:04:31 -0800 From: "Kinney, Michael D" To: Felix Poludov , "Gao, Liming" , "Yao, Jiewen" , "edk2-devel@lists.01.org" , "Kinney, Michael D" Thread-Topic: [PATCH 0/2] MdePkg: UiLib library Thread-Index: AdI6m0xU2GzkXpsESA6bOeJKPIUocQAWQyagABdz3yAAA/EqMAABgzwwAAED+jA= Date: Thu, 10 Nov 2016 16:04:30 +0000 Message-ID: References: <9333E191E0D52B4999CE63A99BA663A00270FF997D@atlms1.us.megatrends.com> <74D8A39837DF1E4DA445A8C0B3885C50386CDB6E@shsmsx102.ccr.corp.intel.com> <9333E191E0D52B4999CE63A99BA663A00270FF9E17@atlms1.us.megatrends.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14B4B07B6@shsmsx102.ccr.corp.intel.com> <9333E191E0D52B4999CE63A99BA663A00270FF9E7D@atlms1.us.megatrends.com> In-Reply-To: <9333E191E0D52B4999CE63A99BA663A00270FF9E7D@atlms1.us.megatrends.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2Y5MWU1YjMtYTFlMi00OWI3LTgwNzItOGNkNzUzYmU5YWRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImpQU3JETVgrd1FcLzBaNTNvRlBYVU0zSVVZYUZsS2pjSVBzK3RNOTQ2cVVFPSJ9 x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Subject: Re: [PATCH 0/2] MdePkg: UiLib library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2016 16:04:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Felix, The CONSTRUCTOR for the UiLib could do the registration. Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fe= lix > Poludov > Sent: Thursday, November 10, 2016 7:44 AM > To: Gao, Liming ; Yao, Jiewen ; edk2- > devel@lists.01.org > Subject: Re: [edk2] [PATCH 0/2] MdePkg: UiLib library >=20 > Liming, >=20 > With your proposal if a projects uses RegisterCreatePopUpHandler(), DSC f= ile has > to be updated to link popup handler NULL library > with all the modules that consume CreatePopup(). > Since projects tend to evolve (new modules added, existing code changes),= this > sounds like a constant maintenance effort. > Project integrator would have to scan source tree after each commit to ch= eck if a > new code that uses CretePopup has been added and if new DSC file modifica= tions > are required. >=20 > Thanks > Felix >=20 > From: Gao, Liming [mailto:liming.gao@intel.com] > Sent: Thursday, November 10, 2016 10:10 AM > To: Felix Poludov; Yao, Jiewen; edk2-devel@lists.01.org > Subject: RE: [PATCH 0/2] MdePkg: UiLib library >=20 > Felix: > I think two major concerns are here. >=20 > 1) UefiLib depends on UiLib >=20 > 2) UiLib class is defined in MdePkg. >=20 > To resolve it, I have another idea. >=20 > 1) Introduce new API RegisterCreatePopUpHandler() in UefiLib. Its i= nput > parameter is the handler function that is same to UiCreatePopUpVaList(). >=20 > 2) Update CreatePopup() to use the registered handler if new handle= r is > registered. If no handler, CreatePopup() still uses current logic. >=20 > 3) If platform wants to customize CreatePopup(), it can provide its= library > instance with library constructor only. Its library class is NULL, its li= brary > constructor() will consume RegisterCreatePopUpHandler() to register its h= andler. > This solution is compatible. It just updates UefiLib, doesn't need to u= pdate > platform DSC files if the platforms don't enable the customized popup. It= doesn't > conflict with new UiLib design. New UiLib class introduce new APIs and up= date > edk2 codes to use new one. For the driver uses old API, this way can prov= ide the > customization. For the driver uses new API, the different UiLib instances= can > provide the customization. >=20 > Thanks > Liming > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fe= lix > Poludov > Sent: Thursday, November 10, 2016 9:38 PM > To: Yao, Jiewen >; edk2= - > devel@lists.01.org > Subject: Re: [edk2] [PATCH 0/2] MdePkg: UiLib library >=20 > Hi Jiewen, >=20 > Updating "all the code that uses the old API to use the new API" is not a= lways > possible. > We can certainly update all the EDKII packages; however, it is trickier w= ith the > non-open source packages. > For example, the Reference Code we are getting from a chipset vendor is u= sing > CreatePopUp. > Certainly, if we mark CreatePopUp deprecated (as you have suggested), the= chances > are, reference code will get eventually updated not to use the function. > However, it might take a significant amount of time. > Moreover, a project integrators that create board firmware by combining o= pen- > source and close-source packages coming from multiple sources(from multip= le > vendors), > would have to solve this issue again and again; whereas with my proposal,= the > issue is solved by upgrading EDKII code base (no need to touch third part= y > packages). >=20 > Having said that, I do understand your concerns with keeping the library = in > MdePkg. > How about finding a middle ground between your proposal and my proposal? > We can keep UiLib instance in MdePkg, but keep only a minimalistic barebo= nes > implementation there. > We can also have another, more advanced, UiLib instance in the MdeModuleP= kg. > This technique is already used in EDKII. > For example, MdePkg defines DebugLib library class and provides > BaseDebugLibSerialPort instance. > MdeModulePkg provides PeiDxeDebugLibReportStatusCode instance for the sam= e > library class. >=20 > Since "advanced" version of Popup is not currently available, there is no= need to > create new instance in MdeModulePkg. > However, once Eric is ready with his Popup-on-top-of-HII implementation, = it can > be added to a new UiLib instance in MdeModulePkg. > Also, if new functions are added to UiLib in the future, MdePkg UiLib ins= tance > can have a NULL implementation like many other libraries in the MdePkg. >=20 > What do you think? >=20 > Thanks > Felix >=20 > From: Yao, Jiewen [mailto:jiewen.yao@intel.com] > Sent: Wednesday, November 09, 2016 8:54 PM > To: Felix Poludov; edk2-devel@lists.01.org > Subject: RE: [PATCH 0/2] MdePkg: UiLib library >=20 > HI Poludov > It is a good idea to have a new UiLib. >=20 > Both Mike and I give the suggestion to "You could define new lib and upda= te all > the code that uses the old API to use the new API." >=20 > IMHO, I do not think it is right way to let UefiLib depend on a UiLib. > We have plan to resolve it, but since you already have proposal to add Ui= Lib. I > hope it can be resolved here. >=20 > There is no real need to put UiLib into MdePkg. MdePkg is designed to hol= d EFI/PI > speciation or industry standard. > In this case, I believe MdeModulePkg is a better place. >=20 > Thank you > Yao Jiewen >=20 >=20 > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > > Felix Poludov > > Sent: Wednesday, November 9, 2016 11:44 PM > > To: edk2-devel@lists.01.org > > Subject: [edk2] [PATCH 0/2] MdePkg: UiLib library > > > > This series of two patches introduces new UiLib library. > > 1. New UiLib library class is added to MdePkg. > > The library is intended for functions that produce UI elements. > > The patch introduces two functions that produce a popup window: > > UiCreatePopUp and UiCreatePopUpVaList. > > 2. An instance of UiLib library class is added to MdePkg. > > Popup implementation is copied from UefiLib > > (CreatePopUp function in UefiLib/Console.c). > > 3. MdePkg/UefiLib library is updated to implement CreatePopUp > > by calling UiCreatePopUpVaList. > > 4. Platform DSC files are updated to add UiLib instance. > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Felix Polyudov > > > > AppPkg/AppPkg.dsc | 1 + > > ArmPkg/ArmPkg.dsc | 1 + > > BeagleBoardPkg/BeagleBoardPkg.dsc | 1 + > > CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc | 1 + > > CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 1 + > > CryptoPkg/CryptoPkg.dsc | 1 + > > DuetPkg/DuetPkgIa32.dsc | 1 + > > DuetPkg/DuetPkgX64.dsc | 1 + > > EdkCompatibilityPkg/EdkCompatibilityPkg.dsc | 1 + > > EmbeddedPkg/EmbeddedPkg.dsc | 1 + > > EmulatorPkg/EmulatorPkg.dsc | 1 + > > FatPkg/FatPkg.dsc | 1 + > > .../IntelFrameworkModulePkg.dsc | 1 + > > IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 1 + > > IntelFspWrapperPkg/IntelFspWrapperPkg.dsc | 1 + > > MdeModulePkg/MdeModulePkg.dsc | 1 + > > MdePkg/Include/Library/UiLib.h | 71 +++++ > > MdePkg/Library/UefiLib/Console.c | 252 > > +--------------- > > MdePkg/Library/UefiLib/UefiLib.inf | 1 + > > MdePkg/Library/UefiLib/UefiLibInternal.h | 1 + > > MdePkg/Library/UiLib/UiLib.c | 334 > > +++++++++++++++++++++ > > MdePkg/Library/UiLib/UiLib.inf | 38 +++ > > MdePkg/Library/UiLib/UiLib.uni | 21 ++ > > MdePkg/MdePkg.dec | 3 + > > NetworkPkg/NetworkPkg.dsc | 1 + > > Nt32Pkg/Nt32Pkg.dsc | 1 + > > Omap35xxPkg/Omap35xxPkg.dsc | 1 + > > OptionRomPkg/OptionRomPkg.dsc | 1 + > > OvmfPkg/OvmfPkgIa32.dsc | 1 + > > OvmfPkg/OvmfPkgIa32X64.dsc | 1 + > > OvmfPkg/OvmfPkgX64.dsc | 1 + > > PcAtChipsetPkg/PcAtChipsetPkg.dsc | 1 + > > PerformancePkg/PerformancePkg.dsc | 1 + > > QuarkPlatformPkg/Quark.dsc | 1 + > > QuarkPlatformPkg/QuarkMin.dsc | 1 + > > QuarkSocPkg/QuarkSocPkg.dsc | 1 + > > SecurityPkg/SecurityPkg.dsc | 1 + > > ShellPkg/ShellPkg.dsc | 1 + > > SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 1 + > > StdLib/StdLib.dsc | 1 + > > UefiCpuPkg/UefiCpuPkg.dsc | 1 + > > Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 1 + > > Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 + > > Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 1 + > > 44 files changed, 506 insertions(+), 251 deletions(-) > > create mode 100644 MdePkg/Include/Library/UiLib.h > > create mode 100644 MdePkg/Library/UiLib/UiLib.c > > create mode 100644 MdePkg/Library/UiLib/UiLib.inf > > create mode 100644 MdePkg/Library/UiLib/UiLib.uni > > > > Please consider the environment before printing this email. > > > > The information contained in this message may be confidential and > > proprietary to American Megatrends, Inc. This communication is intended > > to be read only by the individual or entity to whom it is addressed or = by their > > designee. If the reader of this message is not the intended recipient, = you are > > on notice that any distribution of this message, in any form, is strict= ly > > prohibited. Please promptly notify the sender by reply e-mail or by > > telephone at 770-246-8600, and then delete or destroy all copies of the > > transmission. > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel >=20 > Please consider the environment before printing this email. >=20 > The information contained in this message may be confidential and proprie= tary to > American Megatrends, Inc. This communication is intended to be read only = by the > individual or entity to whom it is addressed or by their designee. If the= reader > of this message is not the intended recipient, you are on notice that any > distribution of this message, in any form, is strictly prohibited. Please > promptly notify the sender by reply e-mail or by telephone at 770-246-860= 0, and > then delete or destroy all copies of the transmission. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >=20 > Please consider the environment before printing this email. >=20 > The information contained in this message may be confidential and proprie= tary to > American Megatrends, Inc. This communication is intended to be read only= by the > individual or entity to whom it is addressed or by their designee. If the= reader > of this message is not the intended recipient, you are on notice that any > distribution of this message, in any form, is strictly prohibited. Pleas= e > promptly notify the sender by reply e-mail or by telephone at 770-246-860= 0, and > then delete or destroy all copies of the transmission. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel