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.web08.41059.1624239221652935765 for ; Sun, 20 Jun 2021 18:33:42 -0700 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 ; Mon, 21 Jun 2021 09:33:34 +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: "'Jiewen Yao'" , "'Jian J Wang'" , "'Xiaoyu Lu'" , "'Mike Kinney'" , "'Ard Biesheuvel'" References: In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHY2IDAvMl0gQ3J5cHRvUGtnL09wZW5zc2xMaWI6IEFkZCBuYXRpdmUgaW5zdHJ1Y3Rpb24gc3VwcG9ydCBmb3IgWDY0?= Date: Mon, 21 Jun 2021 09:33:35 +0800 Message-ID: <007601d7663d$7418a790$5c49f6b0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFzllcILTG7MWpIES6k50ub60nqmavlTQVQ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Christopher: Nasm should support GCC tool chain. Do you meet with the problem on nasm version assembly code? So, you have to add GAS assembly code. This topic may be discussed last year. Can you give some detail for it? Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA= =B1=ED Christopher > Zurcher > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA6=D4=C219=C8=D5 10:09 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Jiewen Yao ; Jian J Wang > ; Xiaoyu Lu ; Mike Kinney > ; Ard Biesheuvel > =D6=F7=CC=E2: [edk2-devel] [PATCH v6 0/2] CryptoPkg/OpensslLib: Add nati= ve > instruction support for X64 >=20 > From: Christopher Zurcher >=20 > V6 Changes: > Add GCC-compatible version of these modifications. Supporting GCC buil= d of > native OpenSSL .S files requires removal of *(COMMON) from the > /DISCARD/ > section of the GCC linker script. > The VS/CLANG portion of the patch is unchanged from the > previously-approved > patchset. >=20 > V5 Changes: > Move ApiHooks.c into X64 folder > Update process_files.pl to clean architecture-specific subfolders without > removing them > Rebased INF file to merge latest changes regarding RngLib vs. TimerLib >=20 > V4 Changes: > Add copyright header to uefi-asm.conf > Move [Sources.X64] block to cover entire X64-specific config >=20 > V3 Changes: > Added definitions for ptrdiff_t and wchar_t to CrtLibSupport.h for > LLVM/Clang build support. > Added -UWIN32 to GCC Flags for LLVM/Clang build support. > Added missing AES GCM assembly file. >=20 > V2 Changes: > Limit scope of assembly config to SHA and AES functions. > Removed IA32 native support (reduced config was causing build failure and > can be added in a later patch). > Removed XMM instructions from assembly generation. > Added automatic copyright header porting for generated assembly files. >=20 > This patch adds support for building the native instruction algorithms f= or > the X64 architecture in OpensslLib. The process_files.pl script was modified > to parse the .asm file targets from the OpenSSL build config data struct= , and > generate the necessary assembly files for the EDK2 build environment. >=20 > For the X64 variant, OpenSSL includes calls to a Windows error handling API, > and that function has been stubbed out in ApiHooks.c. >=20 > For all variants, a constructor is added to call the required CPUID function > within OpenSSL to facilitate processor capability checks in the native > algorithms. >=20 > Additional native architecture variants should be simple to add by following > the changes made for this architecture. >=20 > The OpenSSL assembly files are traditionally generated at build time usi= ng a > perl script. To avoid that burden on EDK2 users, these end-result assemb= ly > files are generated during the configuration steps performed by the package > maintainer (through process_files.pl). The perl generator scripts inside > OpenSSL do not parse file comments as they are only meant to create > intermediate build files, so process_files.pl contains additional hooks = to > preserve the copyright headers as well as clean up tabs and line endings to > comply with EDK2 coding standards. The resulting file headers align with > the generated .h files which are already included in the EDK2 repository= . >=20 > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Mike Kinney > Cc: Ard Biesheuvel >=20 > Christopher Zurcher (2): > CryptoPkg/OpensslLib: Add native instruction support for X64 > CryptoPkg/OpensslLib: Commit the auto-generated assembly files for X64 >=20 > BaseTools/Scripts/GccBase.lds > | 1 - > CryptoPkg/CryptoPkg.ci.yaml > | 21 +- > CryptoPkg/Library/Include/CrtLibSupport.h > | 2 + > CryptoPkg/Library/Include/openssl/opensslconf.h > | 3 - > CryptoPkg/Library/OpensslLib/OpensslLib.inf > | 2 +- > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c > | 44 + > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > | 2 +- > CryptoPkg/Library/OpensslLib/OpensslLibX64.inf > | 653 +++ > CryptoPkg/Library/OpensslLib/OpensslLibX64Gcc.inf > | 653 +++ > CryptoPkg/Library/OpensslLib/UefiAsm.conf > | 30 + > CryptoPkg/Library/OpensslLib/X64/ApiHooks.c > | 22 + > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm > | 732 +++ > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm > | 1916 ++++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm > | 78 + > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm > | 5103 ++++++++++++++++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm > | 1173 +++++ > CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm > | 34 + > CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm > | 1569 ++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm > | 3137 ++++++++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm > | 2884 +++++++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm > | 3461 +++++++++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-x86_64.nasm > | 3313 +++++++++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm > | 1938 ++++++++ > CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm > | 491 ++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-mb-x86_64.S > | 552 +++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-sha1-x86_64.S > | 1719 +++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-sha256-x86_64.S | > 69 + > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-x86_64.S > | 4484 +++++++++++++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/vpaes-x86_64.S > | 863 ++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/modes/aesni-gcm-x86_64.S > | 29 + > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/modes/ghash-x86_64.S > | 1386 ++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha1-mb-x86_64.S > | 2962 ++++++++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha1-x86_64.S > | 2631 ++++++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha256-mb-x86_64.S > | 3286 +++++++++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha256-x86_64.S > | 3097 ++++++++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha512-x86_64.S > | 1811 +++++++ > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/x86_64cpuid.S > | 491 ++ > CryptoPkg/Library/OpensslLib/process_files.pl > | 241 +- > 38 files changed, 50828 insertions(+), 55 deletions(-) > create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c > create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf > create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64Gcc.inf > create mode 100644 CryptoPkg/Library/OpensslLib/UefiAsm.conf > create mode 100644 CryptoPkg/Library/OpensslLib/X64/ApiHooks.c > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-mb-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha1-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-sha256-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/aes/aesni-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/aes/vpaes-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/modes/aesni-gcm-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/modes/ghash-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-mb-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha1-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-mb-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha256-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/sha/sha512-x86_64.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64/crypto/x86_64cpuid.nasm > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-mb-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-sha1-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-sha256-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/aesni-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/aes/vpaes-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/modes/aesni-gcm-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/modes/ghash-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha1-mb-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha1-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha256-mb-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha256-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/sha/sha512-x86_64.S > create mode 100644 > CryptoPkg/Library/OpensslLib/X64Gcc/crypto/x86_64cpuid.S >=20 > -- > 2.32.0.windows.1 >=20 >=20 >=20 >=20 >=20