From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=ryszard.knop@linux.intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 4E105211C572E for ; Wed, 6 Feb 2019 02:14:32 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2019 02:14:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,339,1544515200"; d="scan'208";a="272893558" Received: from linux.intel.com ([10.54.29.200]) by orsmga004.jf.intel.com with ESMTP; 06 Feb 2019 02:14:32 -0800 Received: from torii (torii.igk.intel.com [10.102.24.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 58B2E5803DC; Wed, 6 Feb 2019 02:14:30 -0800 (PST) Message-ID: <4af53815e6a90c8a0365ac96614ff1dfb7bfc4f8.camel@linux.intel.com> From: Ryszard Knop To: "Kinney, Michael D" , Ard Biesheuvel , "edk2-devel@lists.01.org" , "Carsey, Jaben" Cc: "Kacperski, Kamil" , "Jin, Eric" , "Orlowski, Pawel" , "Hsiung, Harry L" Date: Wed, 06 Feb 2019 11:14:28 +0100 In-Reply-To: References: <20181115023353.20159-1-ard.biesheuvel@linaro.org> <20181115023353.20159-11-ard.biesheuvel@linaro.org> <5d96a29db8d2bc102e1765be3c52bc3cbab3e958.camel@linux.intel.com> Organization: Intel Corporation User-Agent: Evolution 3.30.5 MIME-Version: 1.0 Subject: Re: [PATCH edk2-staging 10/20] IntelUndiPkg/XGigUndiDxe: drop StdLibC library class reference X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 10:14:33 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mike, As mentioned in previous mails, we can't change some of our code to meet the coding standard. I've filled BZ #1516 with everything we need, plus what CryptoPkg provides for reference. Thanks, Richard. On Wed, 2019-01-30 at 20:58 +0000, Kinney, Michael D wrote: > Hi Richard, > > It is possible to update C code to prevent the use of compiler > intrinsic functions. This is what we have done for EDK II modules > that are built for both IA32 and X64. > > The one exception is the use of OpenSSL. We prefer to use that > project "as is" as a git submodule, so modifying the OpenSSL > sources to prevent use of intrinsic functions was not practical. > The CryptoPkg has the minimum set of intrinsic functions required > For OpenSSL to build. > > We do recognize that this issue is difficult for developers to > resolve because the techniques require generation of mixed C/asm > output files to track down the C statements that are generating > the intrinsic functions. > > Similar to the ARM support for an intrinsic lib, it may be > reasonable to add a small intrinsic lib for IA32 and X64 that > supports the intrinsic functions that are seen the most often. > May require an intrinsic lib for each supported tool chain. > > This would be a new feature that would take some effort to > implement and validate. Can you enter an Bugzilla for this > feature and list the specific intrinsic functions needed for > this driver? > > Thanks, > > Mike > > > -----Original Message----- > > From: Ryszard Knop > > [mailto:ryszard.knop@linux.intel.com] > > Sent: Wednesday, January 30, 2019 9:27 AM > > To: Ard Biesheuvel ; edk2- > > devel@lists.01.org; Carsey, Jaben > > > > Cc: Kacperski, Kamil ; Jin, > > Eric ; Orlowski, Pawel > > ; Kinney, Michael D > > ; Hsiung, Harry L > > > > Subject: Re: [edk2] [PATCH edk2-staging 10/20] > > IntelUndiPkg/XGigUndiDxe: drop StdLibC library class > > reference > > > > That's actually not quite correct - we need this > > package to build on > > IA32. It's named rather unfortunately, since it's not > > the EDK2 StdLibC, > > but rather a package in this repository - see > > IntelUndiPkg/LibC. It > > contains the bare minimum of functionality required to > > fix missing 64- > > bit math/shifts on IA32 and missing memcpy/memset > > intrinsics. We can't > > prevent MSVC from yielding memcpy/memset either, so > > this was the nasty > > solution for build issues. You have included > > CompilerIntrinsicsLib for > > the same reason, too :) > > > > I'm not aware of any X64/IA32 equivalent of your > > CompilerIntrinsicsLib, > > but I'd be happy to be proven wrong here. I'm off for > > the rest of the > > week - I'll continue with reviews and merging early > > next week. > > > > Thanks, Richard. > > > > On Wed, 2018-11-14 at 18:33 -0800, ard.biesheuvela > > wrote: > > > StdLibc should not be used in drivers (it has > > dependencies on Shell > > > protocols), but in fact, we don't appear to rely on > > it in the first > > > place, so just drop the reference. > > > > > > Contributed-under: TianoCore Contribution Agreement > > 1.1 > > > Signed-off-by: Ard Biesheuvel > linaro.org> > > > --- > > > IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf > > > b/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf > > > index beee8aa8134e..b5747565fbea 100644 > > > --- a/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf > > > +++ b/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf > > > @@ -132,7 +132,6 @@ GCC:*_*_*_CC_FLAGS = -DEFI32 > > > PrintLib > > > UefiLib > > > HiiLib > > > - StdLibC > > > > > > [LibraryClasses.X64] > > >