From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.171.2.60; helo=ma1-aaemail-dr-lapp01.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) (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 20263211BD60B for ; Wed, 30 Jan 2019 10:34:23 -0800 (PST) Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.27/8.16.0.27) with SMTP id x0UIWG59034822; Wed, 30 Jan 2019 10:34:17 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-type : sender : from : message-id : subject : date : in-reply-to : cc : to : references; s=20180706; bh=ZD3fuTsGHqc+riCwrL1zH4w2sTQeqDhadNu1REwiydM=; b=ECiG5r1BcBBpkbJVuE+0Ao9G1lOPQFU/nJPMiRWN1VvXrMLdcA73XTeAQEA2k3CSIFVa +OcesTh++z9UFu1ZDvC2jbsjwEuMf099Gl+9Sv5nMHvxTuL6fs+Ojkm8PgM/MURb0zb0 5Fz+WfU7pNyY7bxVJAt6EC+pfTvF6xTKe0UGZ5GI4oQa0YA1MExNt7OXqKW7puEq8VdV HpNdW62UkEWdZtJAmivWfjpFJR+Qm/gp40mAJEwVtAv0p23XkR1/9epe61x4j7eqU05N mk4hzDJkC4dX9paWc6AMjUkWQaQ9o2icyZOqxYuQumlGmHFhBQ4bTa6d9hY+uWgl+MSf YQ== Received: from mr2-mtap-s02.rno.apple.com (mr2-mtap-s02.rno.apple.com [17.179.226.134]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 2q8q3busng-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 30 Jan 2019 10:34:17 -0800 MIME-version: 1.0 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by mr2-mtap-s02.rno.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PM500FVPQ956150@mr2-mtap-s02.rno.apple.com>; Wed, 30 Jan 2019 10:34:17 -0800 (PST) Received: from process_viserion-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PM500100Q485L00@nwk-mmpp-sz10.apple.com>; Wed, 30 Jan 2019 10:34:17 -0800 (PST) X-Va-A: X-Va-T-CD: 8ce756654ae98313d4f7f72588eaf5e9 X-Va-E-CD: b41296365202aca3a9af0c02d2bece58 X-Va-R-CD: bbeb10ff0f8392eebfff1286b6180d13 X-Va-CD: 0 X-Va-ID: 48bd0f1a-b105-44da-821b-5e841d6e52e3 X-V-A: X-V-T-CD: 8ce756654ae98313d4f7f72588eaf5e9 X-V-E-CD: b41296365202aca3a9af0c02d2bece58 X-V-R-CD: bbeb10ff0f8392eebfff1286b6180d13 X-V-CD: 0 X-V-ID: bd2e33e8-175c-4821-8eaf-91c761ce3845 Received: from process_milters-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PM500L00Q24GI00@nwk-mmpp-sz10.apple.com>; Wed, 30 Jan 2019 10:34:16 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-30_14:,, signatures=0 Received: from da0602a-dhcp105.apple.com (da0602a-dhcp105.apple.com [17.226.23.105]) by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PM500CDQQ94Y890@nwk-mmpp-sz10.apple.com>; Wed, 30 Jan 2019 10:34:16 -0800 (PST) Sender: afish@apple.com From: Andrew Fish Message-id: <9050A2BF-DB7E-48DA-8C7E-490C1B2F1958@apple.com> Date: Wed, 30 Jan 2019 10:34:13 -0800 In-reply-to: <5d96a29db8d2bc102e1765be3c52bc3cbab3e958.camel@linux.intel.com> Cc: Ard Biesheuvel , edk2-devel@lists.01.org, "Carsey, Jaben" , Mike Kinney , Harry Hsiung , eric.jin@intel.com, pawel.orlowski@intel.com, kamil.kacperski@intel.com To: Ryszard Knop References: <20181115023353.20159-1-ard.biesheuvel@linaro.org> <20181115023353.20159-11-ard.biesheuvel@linaro.org> <5d96a29db8d2bc102e1765be3c52bc3cbab3e958.camel@linux.intel.com> X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-30_14:, , signatures=0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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, 30 Jan 2019 18:34:23 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Jan 30, 2019, at 9:26 AM, Ryszard Knop wrote: > > 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 :) > Ryszard, For IA32/X64 we avoid the compiler intrinsic libs via the coding standard. 1) If you don't assign something too large at execution time with an = the compiler will not inline memcpy()/memset() 2) BaseLib.h has all the math functions that generate intrinsics that your code can call explicitly: https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/BaseLib.h#L3533 UINT64 X=0x100000000; UINT64 Y=2; So: Y = X*Y; should be: Y = MultU64x64 (X, Y); When ARM got added much later and some versions of ARM did not even have a divide instruction we gave up on trying to add more functions into all the existing IA32 code, and add the intrinsic lib. If we are going to add an intrinsic lib for x86 then we should probably add it to the MdePkg and it needs to support MSVC and GCC (as far as I can tell clang should work with the GCC intrinsics). Thanks, Andrew Fish > 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 >> --- >> 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] >> > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel