From: "Zurcher, Christopher J" <christopher.j.zurcher@intel.com>
To: devel@edk2.groups.io
Cc: Jiewen Yao <jiewen.yao@intel.com>,
Jian J Wang <jian.j.wang@intel.com>,
Xiaoyu Lu <xiaoyux.lu@intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH v2 0/2] CryptoPkg/OpensslLib: Add native instruction support for X64
Date: Mon, 3 Aug 2020 17:24:27 -0700 [thread overview]
Message-ID: <20200804002429.3897-1-christopher.j.zurcher@intel.com> (raw)
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.
This patch adds support for building the native instruction algorithms for
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.
For the X64 variant, OpenSSL includes calls to a Windows error handling API,
and that function has been stubbed out in ApiHooks.c.
For all variants, a constructor is added to call the required CPUID function
within OpenSSL to facilitate processor capability checks in the native
algorithms.
Additional native architecture variants should be simple to add by following
the changes made for this architecture.
The OpenSSL assembly files are traditionally generated at build time using a
perl script. To avoid that burden on EDK2 users, these end-result assembly
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.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Christopher J Zurcher (2):
CryptoPkg/OpensslLib: Add native instruction support for X64
CryptoPkg/OpensslLib: Commit the auto-generated assembly files for X64
CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 +-
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +-
CryptoPkg/Library/OpensslLib/OpensslLibX64.inf | 656 +++
CryptoPkg/Library/Include/openssl/opensslconf.h | 3 -
CryptoPkg/Library/OpensslLib/ApiHooks.c | 18 +
CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c | 34 +
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/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/process_files.pl | 223 +-
CryptoPkg/Library/OpensslLib/uefi-asm.conf | 15 +
20 files changed, 26698 insertions(+), 50 deletions(-)
create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibX64.inf
create mode 100644 CryptoPkg/Library/OpensslLib/ApiHooks.c
create mode 100644 CryptoPkg/Library/OpensslLib/OpensslLibConstructor.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/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/uefi-asm.conf
--
2.28.0.windows.1
next reply other threads:[~2020-08-04 0:24 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 0:24 Zurcher, Christopher J [this message]
2020-08-04 0:24 ` [PATCH v2 1/2] CryptoPkg/OpensslLib: Add native instruction support for X64 Zurcher, Christopher J
2020-08-11 11:46 ` [edk2-devel] " Guomin Jiang
2020-08-13 15:03 ` Yao, Jiewen
2020-08-18 22:49 ` Zurcher, Christopher J
[not found] ` <162C7E6ED8CEF542.12673@groups.io>
2020-08-24 21:25 ` [edk2-devel] " Zurcher, Christopher J
2020-08-24 23:35 ` Yao, Jiewen
2020-09-16 9:17 ` Guomin Jiang
2020-09-22 15:21 ` Zurcher, Christopher J
2020-09-23 2:35 ` Yao, Jiewen
2020-09-25 0:28 ` Zurcher, Christopher J
2020-09-25 0:49 ` 回复: " gaoliming
2020-09-25 1:06 ` Zurcher, Christopher J
2020-09-25 1:11 ` Yao, Jiewen
2020-09-25 1:14 ` Zurcher, Christopher J
[not found] ` <1637E1D4851CF309.11037@groups.io>
2020-09-25 2:28 ` Zurcher, Christopher J
[not found] ` <1637E5DD452A46F1.2312@groups.io>
2020-09-25 8:01 ` Zurcher, Christopher J
2020-09-29 21:08 ` Zurcher, Christopher J
2020-10-01 12:58 ` Laszlo Ersek
2020-10-08 19:56 ` Zurcher, Christopher J
2020-10-09 11:37 ` Laszlo Ersek
2020-10-09 19:27 ` Zurcher, Christopher J
2020-10-15 7:14 ` Laszlo Ersek
2020-08-04 0:24 ` [PATCH v2 2/2] CryptoPkg/OpensslLib: Commit the auto-generated assembly files " Zurcher, Christopher J
2020-08-13 15:24 ` Yao, Jiewen
2020-08-13 15:37 ` Michael D Kinney
2020-08-13 15:45 ` Yao, Jiewen
2020-08-14 19:34 ` Zurcher, Christopher J
2020-08-18 2:36 ` Wang, Jian J
2020-08-18 16:15 ` Michael D Kinney
2020-08-18 21:33 ` [edk2-devel] " Sean
2020-08-18 23:29 ` Andrew Fish
2020-08-19 16:33 ` Liming Gao
2020-08-19 10:43 ` Laszlo Ersek
2020-08-19 16:08 ` Michael D Kinney
2020-08-19 17:21 ` Laszlo Ersek
2020-08-18 16:15 ` Michael D Kinney
2020-08-18 21:22 ` Zurcher, Christopher J
2020-08-19 15:37 ` [edk2-devel] " Andrew Fish
2020-08-19 18:06 ` Laszlo Ersek
2020-08-25 0:55 ` Andrew Fish
2020-08-26 10:05 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200804002429.3897-1-christopher.j.zurcher@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox