From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web12.3265.1646186803979192784 for ; Tue, 01 Mar 2022 18:06:45 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 02 Mar 2022 10:06:18 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Xiaoyu Lu'" , "'Bob Feng'" , "'Rebecca Cran'" , "'James Bottomley'" , "'Sami Mujawar'" , "'Jordan Justen'" , "'Erdem Aktas'" , "'Jiewen Yao'" , "'Supreeth Venkatesh'" , "'Sebastien Boeuf'" , "'Zhichao Gao'" , "'Zhiguang Liu'" , "'Maciej Rabeda'" , "'Maurice Ma'" , "'Andrew Fish'" , "'Ard Biesheuvel'" , "'Tom Lendacky'" , "'Peter Grehan'" , "'Sean Brogan'" , "'Guomin Jiang'" , "'Bret Barkelew'" , "'Yuwei Chen'" , "'Benjamin You'" , "'Daniel Schaefer'" , "'Michael D Kinney'" , "'Wei6 Xu'" , "'Jian J Wang'" , "'Jiaxin Wu'" , "'Siyuan Fu'" , "'Guo Dong'" , , "'Abner Chang'" , "'Oliver Steffen'" , "'Leif Lindholm'" , "'Brijesh Singh'" , "'Min Xu'" , "'Ray Ni'" , "'Alexei Fedorov'" , "'Julien Grall'" , "'Nickle Wang'" , "'Pawel Polawski'" , "'Anthony Perard'" References: <20220301071820.3135133-1-kraxel@redhat.com> In-Reply-To: <20220301071820.3135133-1-kraxel@redhat.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIDAvM10gW1JGQ10gY29uc29saWRhdGUgY29tcGlsZXIgaW50cmluc2ljcw==?= Date: Wed, 2 Mar 2022 10:06:18 +0800 Message-ID: <041201d82dda$1b1bd940$51538bc0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHicnmkzsTVFiDsYWAVCsx9jXmBNKyWzZAg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Gerd: Thanks for your great work. This is a really good progress. I agree to ad= d CompilerIntrinsicsLib in MdePkg. =20 I think we can add this CompilerIntrinsicsLib first to meet with current = usage. It can be extended in future.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Gerd > Hoffmann > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2022=E5=B9=B43=E6=9C=881=E6=97=A5 1= 5:18 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E6=8A=84=E9=80=81: Xiaoyu Lu ; Bob Feng ; > Rebecca Cran ; James Bottomley > ; Sami Mujawar ; Jordan > Justen ; Erdem Aktas ; > Jiewen Yao ; Supreeth Venkatesh > ; Sebastien Boeuf > ; Zhichao Gao ; > Zhiguang Liu ; Maciej Rabeda > ; Maurice Ma ; > Andrew Fish ; Ard Biesheuvel > ; Tom Lendacky ; > Peter Grehan ; Sean Brogan > ; Guomin Jiang ; > Bret Barkelew ; Yuwei Chen > ; Benjamin You ; Daniel > Schaefer ; Liming Gao > ; Michael D Kinney > ; Wei6 Xu ; Jian J Wang > ; Jiaxin Wu ; Siyuan Fu > ; Gerd Hoffmann ; Sami Mujawar > ; Guo Dong ; > kilian_kegel@hotmail.com; Abner Chang ; Oliver > Steffen ; Leif Lindholm ; > Brijesh Singh ; Min Xu ; Ray > Ni ; Alexei Fedorov ; Julien > Grall ; Nickle Wang ; Pawel > Polawski ; Anthony Perard > > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH 0/3] [RFC] consolidate compiler i= ntrinsics >=20 > This is an attept to start cleaning up the messy compiler intrinsics > situation. Today we don't have a core intrinsics library, resulting > in everybody creating their own. ArmPkg has one, CryptoPkg has one. > I'm sure there are many more. >=20 > This doesn't make sense. Given we can't avoid compiler intrinsics (as > proven by the existence of those libraries) we should better have them > as core library so we have to maintain a single version only. >=20 > Given we already have BaseIoLibIntrinsic in MdePkg we can place the > compiler intrinsics there too. This little patch series does just that: > It moves over the existing ArmPkg intrinsics, fixes them to build on > non-arm too, and adds additional bits from the CryptoPkg intrinsics. >=20 > take care, > Gerd >=20 > Gerd Hoffmann (3): > MdePkg: promote CompilerIntrinsicsLib from ArmPkg to MdePkg > MdePkg/CompilerIntrinsicsLib: fix msft sources for x64 > MdePkg/CompilerIntrinsicsLib: move ia32 intrinsics and strcmp >=20 > ArmVirtPkg/ArmVirt.dsc.inc | 4 +- > .../UnitTestFrameworkPkgTarget.dsc.inc | 2 +- > ArmPkg/ArmPkg.dsc | 3 +- > .../ArmCrashDumpDxe/ArmCrashDumpDxe.dsc | 2 +- > ArmPlatformPkg/ArmPlatformPkg.dsc | 2 +- > CryptoPkg/CryptoPkg.dsc | 5 +- > DynamicTablesPkg/DynamicTablesPkg.dsc | 2 +- > EmbeddedPkg/EmbeddedPkg.dsc | 2 +- > EmulatorPkg/EmulatorPkg.dsc | 2 +- > FatPkg/FatPkg.dsc | 2 +- > FmpDevicePkg/FmpDevicePkg.dsc | 4 +- > MdeModulePkg/MdeModulePkg.dsc | 2 +- > MdePkg/MdePkg.dsc | 1 + > NetworkPkg/NetworkPkg.dsc | 4 +- > OvmfPkg/AmdSev/AmdSevX64.dsc | 2 +- > OvmfPkg/Bhyve/BhyveX64.dsc | 2 +- > OvmfPkg/CloudHv/CloudHvX64.dsc | 2 +- > OvmfPkg/Microvm/MicrovmX64.dsc | 2 +- > OvmfPkg/OvmfPkgIa32.dsc | 2 +- > OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- > OvmfPkg/OvmfPkgX64.dsc | 2 +- > OvmfPkg/OvmfXen.dsc | 2 +- > RedfishPkg/RedfishPkg.dsc | 2 +- > SecurityPkg/SecurityPkg.dsc | 12 +-- > ShellPkg/ShellPkg.dsc | 2 +- > SignedCapsulePkg/SignedCapsulePkg.dsc | 14 ++-- > StandaloneMmPkg/StandaloneMmPkg.dsc | 2 +- > UefiPayloadPkg/UefiPayloadPkg.dsc | 2 +- > .../Library/IntrinsicLib/IntrinsicLib.inf | 67 ---------------- > .../CompilerIntrinsicsLib.inf | 15 +++- > {ArmPkg =3D> MdePkg}/Include/AsmMacroIoLib.h | 0 > CryptoPkg/Library/IntrinsicLib/CopyMem.c | 47 ----------- > .../Library/IntrinsicLib/MemoryIntrinsics.c | 74 ------------------ > .../CompilerIntrinsicsLib}/Ia32/MathFtol.c | 0 > .../Ia32/MathLShiftS64.c | 0 > .../Ia32/MathRShiftU64.c | 0 > .../Library/CompilerIntrinsicsLib/memcmp_ms.c | 2 +- > .../Library/CompilerIntrinsicsLib/memcpy.c | 0 > .../Library/CompilerIntrinsicsLib/memcpy_ms.c | 2 +- > .../CompilerIntrinsicsLib/memmove_ms.c | 2 +- > .../Library/CompilerIntrinsicsLib/memset.c | 0 > .../Library/CompilerIntrinsicsLib/memset_ms.c | 2 +- > MdePkg/Library/CompilerIntrinsicsLib/strcmp.c | 33 ++++++++ > ArmPkg/ArmPkg.ci.yaml | 1 - > .../DEBUG_XCODE31/CompilerIntrinsicsLib.lib | Bin 36072 -> 36072 > bytes > .../DEBUG_XCODE32/CompilerIntrinsicsLib.lib | Bin 36072 -> 36072 > bytes > .../Library/IntrinsicLib/BaseIntrinsicLib.uni | 16 ---- > .../CompilerIntrinsicsLib/AArch64/Atomics.S | 0 > .../CompilerIntrinsicsLib/Arm/ashldi3.S | 0 > .../CompilerIntrinsicsLib/Arm/ashrdi3.S | 0 > .../CompilerIntrinsicsLib/Arm/clzsi2.S | 0 > .../CompilerIntrinsicsLib/Arm/ctzsi2.S | 0 > .../Library/CompilerIntrinsicsLib/Arm/div.S | 0 > .../Library/CompilerIntrinsicsLib/Arm/div.asm | 0 > .../CompilerIntrinsicsLib/Arm/divdi3.S | 0 > .../CompilerIntrinsicsLib/Arm/divsi3.S | 0 > .../Library/CompilerIntrinsicsLib/Arm/lasr.S | 0 > .../CompilerIntrinsicsLib/Arm/lasr.asm | 0 > .../CompilerIntrinsicsLib/Arm/ldivmod.S | 0 > .../CompilerIntrinsicsLib/Arm/ldivmod.asm | 0 > .../Library/CompilerIntrinsicsLib/Arm/llsl.S | 0 > .../CompilerIntrinsicsLib/Arm/llsl.asm | 0 > .../Library/CompilerIntrinsicsLib/Arm/llsr.S | 0 > .../CompilerIntrinsicsLib/Arm/llsr.asm | 0 > .../CompilerIntrinsicsLib/Arm/lshrdi3.S | 0 > .../CompilerIntrinsicsLib/Arm/memmove.S | 0 > .../CompilerIntrinsicsLib/Arm/memmove.asm | 0 > .../CompilerIntrinsicsLib/Arm/moddi3.S | 0 > .../CompilerIntrinsicsLib/Arm/modsi3.S | 0 > .../CompilerIntrinsicsLib/Arm/muldi3.S | 0 > .../Library/CompilerIntrinsicsLib/Arm/mullu.S | 0 > .../CompilerIntrinsicsLib/Arm/mullu.asm | 0 > .../CompilerIntrinsicsLib/Arm/sourcery.S | 0 > .../CompilerIntrinsicsLib/Arm/switch.asm | 0 > .../CompilerIntrinsicsLib/Arm/switch16.S | 0 > .../CompilerIntrinsicsLib/Arm/switch32.S | 0 > .../CompilerIntrinsicsLib/Arm/switch8.S | 0 > .../CompilerIntrinsicsLib/Arm/switchu8.S | 0 > .../CompilerIntrinsicsLib/Arm/ucmpdi2.S | 0 > .../CompilerIntrinsicsLib/Arm/udivdi3.S | 0 > .../CompilerIntrinsicsLib/Arm/udivmoddi4.S | 0 > .../CompilerIntrinsicsLib/Arm/udivsi3.S | 0 > .../Library/CompilerIntrinsicsLib/Arm/uldiv.S | 0 > .../CompilerIntrinsicsLib/Arm/uldiv.asm | 0 > .../CompilerIntrinsicsLib/Arm/umoddi3.S | 0 > .../CompilerIntrinsicsLib/Arm/umodsi3.S | 0 > .../Library/CompilerIntrinsicsLib/Arm/uread.S | 0 > .../CompilerIntrinsicsLib/Arm/uread.asm | 0 > .../CompilerIntrinsicsLib/Arm/uwrite.S | 0 > .../CompilerIntrinsicsLib/Arm/uwrite.asm | 0 > .../Ia32/MathLShiftS64.nasm | 0 > .../Ia32/MathRShiftU64.nasm | 0 > MdePkg/MdePkg.ci.yaml | 1 + > 93 files changed, 95 insertions(+), 254 deletions(-) > delete mode 100644 CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > rename {ArmPkg =3D> > MdePkg}/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf (84%) > rename {ArmPkg =3D> MdePkg}/Include/AsmMacroIoLib.h (100%) > delete mode 100644 CryptoPkg/Library/IntrinsicLib/CopyMem.c > delete mode 100644 CryptoPkg/Library/IntrinsicLib/MemoryIntrinsics.c > rename {CryptoPkg/Library/IntrinsicLib =3D> > MdePkg/Library/CompilerIntrinsicsLib}/Ia32/MathFtol.c (100%) > rename {CryptoPkg/Library/IntrinsicLib =3D> > MdePkg/Library/CompilerIntrinsicsLib}/Ia32/MathLShiftS64.c (100%) > rename {CryptoPkg/Library/IntrinsicLib =3D> > MdePkg/Library/CompilerIntrinsicsLib}/Ia32/MathRShiftU64.c (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memcmp_ms.c > (89%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memcpy.c > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memcpy_ms.c > (89%) > rename {ArmPkg =3D> > MdePkg}/Library/CompilerIntrinsicsLib/memmove_ms.c (90%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memset.c > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/memset_ms.c > (89%) > create mode 100644 MdePkg/Library/CompilerIntrinsicsLib/strcmp.c > delete mode 100644 CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni > rename {ArmPkg =3D> > MdePkg}/Library/CompilerIntrinsicsLib/AArch64/Atomics.S (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ashldi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ashrdi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/clzsi2.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ctzsi2.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/div.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/div.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/divdi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/divsi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/lasr.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/lasr.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ldivmod.S > (100%) > rename {ArmPkg =3D> > MdePkg}/Library/CompilerIntrinsicsLib/Arm/ldivmod.asm (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/llsl.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/llsl.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/llsr.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/llsr.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/lshrdi3.S > (100%) > rename {ArmPkg =3D> > MdePkg}/Library/CompilerIntrinsicsLib/Arm/memmove.S (100%) > rename {ArmPkg =3D> > MdePkg}/Library/CompilerIntrinsicsLib/Arm/memmove.asm (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/moddi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/modsi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/muldi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/mullu.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/mullu.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/sourcery.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switch.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switch16.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switch32.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switch8.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/switchu8.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/ucmpdi2.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/udivdi3.S > (100%) > rename {ArmPkg =3D> > MdePkg}/Library/CompilerIntrinsicsLib/Arm/udivmoddi4.S (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/udivsi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uldiv.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uldiv.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/umoddi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/umodsi3.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uread.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uread.asm > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uwrite.S > (100%) > rename {ArmPkg =3D> MdePkg}/Library/CompilerIntrinsicsLib/Arm/uwrite.asm > (100%) > rename {CryptoPkg/Library/IntrinsicLib =3D> > MdePkg/Library/CompilerIntrinsicsLib}/Ia32/MathLShiftS64.nasm (100%) > rename {CryptoPkg/Library/IntrinsicLib =3D> > MdePkg/Library/CompilerIntrinsicsLib}/Ia32/MathRShiftU64.nasm (100%) >=20 > -- > 2.35.1 >=20 >=20 >=20 >=20 >=20