public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH v1 0/7] CryptoPkg: Enable Openssl native instruction support for AARCH64
@ 2023-11-02 13:54 PierreGondois
  2023-11-02 13:54 ` [edk2-devel] [PATCH v1 1/7] MdePkg/BaseLib: AARCH64: Add ArmReadCntPctReg() PierreGondois
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: PierreGondois @ 2023-11-02 13:54 UTC (permalink / raw)
  To: devel
  Cc: Jiewen Yao, Yi Li, Xiaoyu Lu, Guomin Jiang, Leif Lindholm,
	Ard Biesheuvel, Sami Mujawar, Gerd Hoffmann

Various OpensslLib implementations are available in edk2. The
OpensslLibAccel.inf and OpensslLibFullAccel.inf ones use
architecture specific instructions, e.g. AESE, PMULL, SHA256H, ...,
allowing to improve speed.

Enable support for Aarch64's native instructions:
- Add ArmReadCntPctReg() and ArmReadIdAA64Isar0Reg() to
  Aarch64's BaseLib.
- Generate Aarch64's specific Openssl functions.
- Add a OpensslStub/AArch64Cap.c file to allow Openssl
  to probe Aarch64 native instruction support.

This patch-set only enable support for GCC for now (MSFT support
not added).

Pierre Gondois (7):
  MdePkg/BaseLib: AARCH64: Add ArmReadCntPctReg()
  MdePkg/BaseLib: AARCH64: Add ArmReadIdAA64Isar0Reg()
  MdePkg/BaseRngLib: Prefer ArmReadIdAA64Isar0Reg() over
    ArmReadIdIsar0()
  CryptoPkg/OpensslLib: Add native instruction support for AARCH64
  CryptoPkg/OpensslLib: Generate files for AARCH64 native support
  CryptoPkg/OpensslLib: Add AArch64Cap for arch specific hooks
  CryptoPkg: Enable Openssl Accel builds for AARCH64

 CryptoPkg/CryptoPkg.dsc                       |   23 +-
 .../AARCH64-GCC/crypto/aes/aesv8-armx.S       | 3180 ++++++++
 .../AARCH64-GCC/crypto/aes/vpaes-armv8.S      | 1196 +++
 .../AARCH64-GCC/crypto/arm64cpuid.S           |  129 +
 .../AARCH64-GCC/crypto/bn/armv8-mont.S        | 2124 ++++++
 .../crypto/ec/ecp_nistz256-armv8.S            | 4242 +++++++++++
 .../crypto/modes/aes-gcm-armv8_64.S           | 6389 +++++++++++++++++
 .../AARCH64-GCC/crypto/modes/ghashv8-armx.S   |  552 ++
 .../AARCH64-GCC/crypto/sha/keccak1600-armv8.S | 1009 +++
 .../AARCH64-GCC/crypto/sha/sha1-armv8.S       | 1211 ++++
 .../AARCH64-GCC/crypto/sha/sha256-armv8.S     | 2051 ++++++
 .../AARCH64-GCC/crypto/sha/sha512-armv8.S     | 1606 +++++
 .../Library/OpensslLib/OpensslLibAccel.inf    |  642 +-
 .../OpensslLib/OpensslLibFullAccel.inf        |  691 +-
 .../OpensslLib/OpensslStub/AArch64Cap.c       |  107 +
 CryptoPkg/Library/OpensslLib/UefiAsm.conf     |    6 +
 CryptoPkg/Library/OpensslLib/configure.py     |    5 +-
 CryptoPkg/Readme.md                           |   14 +-
 MdePkg/Include/Library/BaseLib.h              |   86 +
 .../BaseLib/AArch64/ArmReadCntPctReg.S        |   30 +
 .../BaseLib/AArch64/ArmReadCntPctReg.asm      |   30 +
 .../AArch64/ArmReadIdAA64Isar0Reg.S}          |   10 +-
 .../AArch64/ArmReadIdAA64Isar0Reg.asm}        |   10 +-
 MdePkg/Library/BaseLib/BaseLib.inf            |    6 +-
 MdePkg/Library/BaseRngLib/AArch64/ArmRng.h    |   12 -
 MdePkg/Library/BaseRngLib/AArch64/Rndr.c      |   14 +-
 MdePkg/Library/BaseRngLib/BaseRngLib.inf      |    2 -
 27 files changed, 25320 insertions(+), 57 deletions(-)
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/aes/aesv8-armx.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/aes/vpaes-armv8.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/arm64cpuid.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/bn/armv8-mont.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/ec/ecp_nistz256-armv8.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/modes/aes-gcm-armv8_64.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/modes/ghashv8-armx.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/sha/keccak1600-armv8.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/sha/sha1-armv8.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/sha/sha256-armv8.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslGen/AARCH64-GCC/crypto/sha/sha512-armv8.S
 create mode 100644 CryptoPkg/Library/OpensslLib/OpensslStub/AArch64Cap.c
 create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadCntPctReg.S
 create mode 100644 MdePkg/Library/BaseLib/AArch64/ArmReadCntPctReg.asm
 rename MdePkg/Library/{BaseRngLib/AArch64/ArmReadIdIsar0.S => BaseLib/AArch64/ArmReadIdAA64Isar0Reg.S} (70%)
 rename MdePkg/Library/{BaseRngLib/AArch64/ArmReadIdIsar0.asm => BaseLib/AArch64/ArmReadIdAA64Isar0Reg.asm} (72%)

-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110547): https://edk2.groups.io/g/devel/message/110547
Mute This Topic: https://groups.io/mt/102342394/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-11-08 16:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 13:54 [edk2-devel] [PATCH v1 0/7] CryptoPkg: Enable Openssl native instruction support for AARCH64 PierreGondois
2023-11-02 13:54 ` [edk2-devel] [PATCH v1 1/7] MdePkg/BaseLib: AARCH64: Add ArmReadCntPctReg() PierreGondois
2023-11-02 13:54 ` [edk2-devel] [PATCH v1 2/7] MdePkg/BaseLib: AARCH64: Add ArmReadIdAA64Isar0Reg() PierreGondois
2023-11-02 13:54 ` [edk2-devel] [PATCH v1 3/7] MdePkg/BaseRngLib: Prefer ArmReadIdAA64Isar0Reg() over ArmReadIdIsar0() PierreGondois
2023-11-02 13:54 ` [edk2-devel] [PATCH v1 4/7] CryptoPkg/OpensslLib: Add native instruction support for AARCH64 PierreGondois
2023-11-02 13:54 ` [edk2-devel] [PATCH v1 5/7] CryptoPkg/OpensslLib: Generate files for AARCH64 native support PierreGondois
2023-11-02 13:54 ` [edk2-devel] [PATCH v1 6/7] CryptoPkg/OpensslLib: Add AArch64Cap for arch specific hooks PierreGondois
2023-11-07  9:21   ` Gerd Hoffmann
2023-11-08 14:40     ` PierreGondois
2023-11-02 13:54 ` [edk2-devel] [PATCH v1 7/7] CryptoPkg: Enable Openssl Accel builds for AARCH64 PierreGondois
2023-11-07  2:38 ` [edk2-devel] [PATCH v1 0/7] CryptoPkg: Enable Openssl native instruction support " Li, Yi
2023-11-07  2:57   ` Yao, Jiewen
2023-11-08 14:39   ` PierreGondois
2023-11-08 15:03     ` Ard Biesheuvel
2023-11-08 16:19       ` PierreGondois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox