Enable the following modules builds for AARCH64:
- OpensslLibAccel.inf
- OpensslLibFullAccel.inf
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
CryptoPkg/CryptoPkg.dsc | 23 ++++++++++---------
.../OpensslLib/OpensslStub/AArch64Cap.c | 15 ++++--------
CryptoPkg/Readme.md | 14 +++++------
3 files changed, 24 insertions(+), 28 deletions(-)
diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 6a0104a3bb68..f08808d5d18e 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -5,6 +5,7 @@
# Copyright (c) 2009 - 2022, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
+# Copyright (c) 2023, Arm Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
@@ -327,7 +328,7 @@ [Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
MSFT:NOOPT_*_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000
}
-[Components.IA32, Components.X64]
+[Components.IA32, Components.X64, Components.AARCH64]
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/TestBaseCryptLibShell.inf {
<Defines>
FILE_GUID = B91B9A95-4D52-4501-A98F-A1711C14ED93
@@ -396,9 +397,9 @@ [Components]
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
}
-[Components.IA32, Components.X64]
+[Components.IA32, Components.X64, Components.AARCH64]
#
- # Build verification of IA32/X64 specific libraries
+ # Build verification of IA32/X64/AARCH64 specific libraries
#
CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf
CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf
@@ -439,9 +440,9 @@ [Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
}
-[Components.IA32, Components.X64]
+[Components.IA32, Components.X64, Components.AARCH64]
#
- # CryptoPei with IA32/X64 performance optimized OpensslLib instance without EC services
+ # CryptoPei with IA32/X64/AARCH64 performance optimized OpensslLib instance without EC services
# IA32/X64 assembly optimizations required larger alignments
#
CryptoPkg/Driver/CryptoPei.inf {
@@ -455,7 +456,7 @@ [Components.IA32, Components.X64]
}
#
- # CryptoPei with IA32/X64 performance optimized OpensslLib instance all services
+ # CryptoPei with IA32/X64/AARCH64 performance optimized OpensslLib instance all services
# IA32/X64 assembly optimizations required larger alignments
#
CryptoPkg/Driver/CryptoPei.inf {
@@ -505,9 +506,9 @@ [Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
}
-[Components.IA32, Components.X64]
+[Components.IA32, Components.X64, Components.AARCH64]
#
- # CryptoDxe with IA32/X64 performance optimized OpensslLib instance with no EC services
+ # CryptoDxe with IA32/X64/AARCH64 performance optimized OpensslLib instance with no EC services
# with TLS feature enabled.
# IA32/X64 assembly optimizations required larger alignments
#
@@ -521,7 +522,7 @@ [Components.IA32, Components.X64]
MSFT:*_*_X64_DLINK_FLAGS = /ALIGN:256
}
#
- # CryptoDxe with IA32/X64 performance optimized OpensslLib instance with all services.
+ # CryptoDxe with IA32/X64/AARCH64 performance optimized OpensslLib instance with all services.
# IA32/X64 assembly optimizations required larger alignments
#
CryptoPkg/Driver/CryptoDxe.inf {
@@ -561,7 +562,7 @@ [Components.IA32, Components.X64]
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
}
#
- # CryptoSmm with IA32/X64 performance optimized OpensslLib instance with no EC services
+ # CryptoSmm with IA32/X64/AARCH64 performance optimized OpensslLib instance with no EC services
# IA32/X64 assembly optimizations required larger alignments
#
CryptoPkg/Driver/CryptoSmm.inf {
@@ -574,7 +575,7 @@ [Components.IA32, Components.X64]
MSFT:*_*_X64_DLINK_FLAGS = /ALIGN:256
}
#
- # CryptoSmm with IA32/X64 performance optimized OpensslLib instance with all services
+ # CryptoSmm with IA32/X64/AARCH64 performance optimized OpensslLib instance with all services
# IA32/X64 assembly optimizations required larger alignments
#
CryptoPkg/Driver/CryptoSmm.inf {
diff --git a/CryptoPkg/Library/OpensslLib/OpensslStub/AArch64Cap.c b/CryptoPkg/Library/OpensslLib/OpensslStub/AArch64Cap.c
index 7468ef3ab54e..faee753b0fdf 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslStub/AArch64Cap.c
+++ b/CryptoPkg/Library/OpensslLib/OpensslStub/AArch64Cap.c
@@ -43,28 +43,23 @@ OPENSSL_cpuid_setup (
*/
OPENSSL_armcap_P |= ARMV7_NEON;
- if (ArmHasAes ())
- {
+ if (ArmHasAes ()) {
OPENSSL_armcap_P |= ARMV8_AES;
}
- if (ArmHasSha1 ())
- {
+ if (ArmHasSha1 ()) {
OPENSSL_armcap_P |= ARMV8_SHA1;
}
- if (ArmHasSha256 ())
- {
+ if (ArmHasSha256 ()) {
OPENSSL_armcap_P |= ARMV8_SHA256;
}
- if (ArmHasPmull ())
- {
+ if (ArmHasPmull ()) {
OPENSSL_armcap_P |= ARMV8_PMULL;
}
- if (ArmHasSha512 ())
- {
+ if (ArmHasSha512 ()) {
OPENSSL_armcap_P |= ARMV8_SHA512;
}
}
diff --git a/CryptoPkg/Readme.md b/CryptoPkg/Readme.md
index 5a68dfb6abd4..cb2228b6b898 100644
--- a/CryptoPkg/Readme.md
+++ b/CryptoPkg/Readme.md
@@ -246,13 +246,13 @@ specific set of enabled cryptographic services. If ECC services are not
required, then the size can be reduced by using OpensslLib.inf instead of
`OpensslLibFull.inf`. Performance optimization requires a size increase.
-| OpensslLib Instance | SSL | ECC | Perf Opt | CPU Arch | Size |
-|:------------------------|:---:|:---:|:--------:|:--------:|:-----:|
-| OpensslLibCrypto.inf | N | N | N | All | +0K |
-| OpensslLib.inf | Y | N | N | All | +0K |
-| OpensslLibAccel.inf | Y | N | Y | IA32/X64 | +20K |
-| OpensslLibFull.inf | Y | Y | N | All | +115K |
-| OpensslLibFullAccel.inf | Y | Y | Y | IA32/X64 | +135K |
+| OpensslLib Instance | SSL | ECC | Perf Opt | CPU Arch | Size |
+|:------------------------|:---:|:---:|:--------:|:----------------:|:-----:|
+| OpensslLibCrypto.inf | N | N | N | All | +0K |
+| OpensslLib.inf | Y | N | N | All | +0K |
+| OpensslLibAccel.inf | Y | N | Y | IA32/X64/AARCH64 | +20K |
+| OpensslLibFull.inf | Y | Y | N | All | +115K |
+| OpensslLibFullAccel.inf | Y | Y | Y | IA32/X64/AARCH64 | +135K |
### SEC Phase Library Mappings
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111479): https://edk2.groups.io/g/devel/message/111479
Mute This Topic: https://groups.io/mt/102707268/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.