Rename A64 config options
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
88d8062545
commit
94a634db96
5 changed files with 181 additions and 115 deletions
|
@ -184,4 +184,19 @@
|
|||
#define MBEDTLS_PK_HAVE_ECC_KEYS
|
||||
#endif /* MBEDTLS_PK_USE_PSA_EC_DATA || MBEDTLS_ECP_C */
|
||||
|
||||
/* Backwards compatibility for some macros which were renamed to reflect that
|
||||
* they are related to Armv8, not aarch64. */
|
||||
#if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT)
|
||||
#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY)
|
||||
#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
|
||||
#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
|
||||
#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_CONFIG_ADJUST_LEGACY_CRYPTO_H */
|
||||
|
|
|
@ -3270,13 +3270,13 @@
|
|||
#define MBEDTLS_SHA256_C
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
|
||||
* \def MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
*
|
||||
* Enable acceleration of the SHA-256 and SHA-224 cryptographic hash algorithms
|
||||
* with the ARMv8 cryptographic extensions if they are available at runtime.
|
||||
* If not, the library will fall back to the C implementation.
|
||||
*
|
||||
* \note If MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT is defined when building
|
||||
* \note If MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT is defined when building
|
||||
* for a non-Armv8 build it will be silently ignored.
|
||||
*
|
||||
* \note Minimum compiler versions for this feature are Clang 4.0,
|
||||
|
@ -3285,27 +3285,38 @@
|
|||
* \note \c CFLAGS must be set to a minimum of \c -march=armv8-a+crypto for
|
||||
* armclang <= 6.9
|
||||
*
|
||||
* \warning MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT cannot be defined at the
|
||||
* same time as MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY.
|
||||
* \note This was previously known as MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT.
|
||||
* That name is deprecated, but may still be used as an alternative form for this
|
||||
* option.
|
||||
*
|
||||
* \warning MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT cannot be defined at the
|
||||
* same time as MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA256_C.
|
||||
*
|
||||
* Module: library/sha256.c
|
||||
*
|
||||
* Uncomment to have the library check for the A64 SHA-256 crypto extensions
|
||||
* Uncomment to have the library check for the Armv8 SHA-256 crypto extensions
|
||||
* and use them if available.
|
||||
*/
|
||||
//#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT.
|
||||
* This name is now deprecated, but may still be used as an alternative form for
|
||||
* this option.
|
||||
*/
|
||||
//#define MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY
|
||||
* \def MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
*
|
||||
* Enable acceleration of the SHA-256 and SHA-224 cryptographic hash algorithms
|
||||
* with the ARMv8 cryptographic extensions, which must be available at runtime
|
||||
* or else an illegal instruction fault will occur.
|
||||
*
|
||||
* \note This allows builds with a smaller code size than with
|
||||
* MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
|
||||
* MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
*
|
||||
* \note Minimum compiler versions for this feature are Clang 4.0,
|
||||
* armclang 6.6 or GCC 6.0.
|
||||
|
@ -3313,17 +3324,28 @@
|
|||
* \note \c CFLAGS must be set to a minimum of \c -march=armv8-a+crypto for
|
||||
* armclang <= 6.9
|
||||
*
|
||||
* \warning MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY cannot be defined at the same
|
||||
* time as MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT.
|
||||
* \note This was previously known as MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY.
|
||||
* That name is deprecated, but may still be used as an alternative form for this
|
||||
* option.
|
||||
*
|
||||
* \warning MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY cannot be defined at the same
|
||||
* time as MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA256_C.
|
||||
*
|
||||
* Module: library/sha256.c
|
||||
*
|
||||
* Uncomment to have the library use the A64 SHA-256 crypto extensions
|
||||
* Uncomment to have the library use the Armv8 SHA-256 crypto extensions
|
||||
* unconditionally.
|
||||
*/
|
||||
//#define MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY
|
||||
//#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY.
|
||||
* This name is now deprecated, but may still be used as an alternative form for
|
||||
* this option.
|
||||
*/
|
||||
//#define MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SHA384_C
|
||||
|
@ -3368,13 +3390,13 @@
|
|||
#define MBEDTLS_SHA3_C
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
|
||||
* \def MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
*
|
||||
* Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms
|
||||
* with the ARMv8 cryptographic extensions if they are available at runtime.
|
||||
* If not, the library will fall back to the C implementation.
|
||||
*
|
||||
* \note If MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT is defined when building
|
||||
* \note If MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT is defined when building
|
||||
* for a non-Aarch64 build it will be silently ignored.
|
||||
*
|
||||
* \note Minimum compiler versions for this feature are Clang 7.0,
|
||||
|
@ -3383,27 +3405,38 @@
|
|||
* \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for
|
||||
* armclang 6.9
|
||||
*
|
||||
* \warning MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT cannot be defined at the
|
||||
* same time as MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY.
|
||||
* \note This was previously known as MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT.
|
||||
* That name is deprecated, but may still be used as an alternative form for this
|
||||
* option.
|
||||
*
|
||||
* \warning MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT cannot be defined at the
|
||||
* same time as MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA512_C.
|
||||
*
|
||||
* Module: library/sha512.c
|
||||
*
|
||||
* Uncomment to have the library check for the A64 SHA-512 crypto extensions
|
||||
* Uncomment to have the library check for the Armv8 SHA-512 crypto extensions
|
||||
* and use them if available.
|
||||
*/
|
||||
//#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT.
|
||||
* This name is now deprecated, but may still be used as an alternative form for
|
||||
* this option.
|
||||
*/
|
||||
//#define MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
|
||||
* \def MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY
|
||||
*
|
||||
* Enable acceleration of the SHA-512 and SHA-384 cryptographic hash algorithms
|
||||
* with the ARMv8 cryptographic extensions, which must be available at runtime
|
||||
* or else an illegal instruction fault will occur.
|
||||
*
|
||||
* \note This allows builds with a smaller code size than with
|
||||
* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
|
||||
* MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
*
|
||||
* \note Minimum compiler versions for this feature are Clang 7.0,
|
||||
* armclang 6.9 or GCC 8.0.
|
||||
|
@ -3411,16 +3444,27 @@
|
|||
* \note \c CFLAGS must be set to a minimum of \c -march=armv8.2-a+sha3 for
|
||||
* armclang 6.9
|
||||
*
|
||||
* \warning MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY cannot be defined at the same
|
||||
* time as MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT.
|
||||
* \note This was previously known as MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY.
|
||||
* That name is deprecated, but may still be used as an alternative form for this
|
||||
* option.
|
||||
*
|
||||
* \warning MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY cannot be defined at the same
|
||||
* time as MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA512_C.
|
||||
*
|
||||
* Module: library/sha512.c
|
||||
*
|
||||
* Uncomment to have the library use the A64 SHA-512 crypto extensions
|
||||
* Uncomment to have the library use the Armv8 SHA-512 crypto extensions
|
||||
* unconditionally.
|
||||
*/
|
||||
//#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY.
|
||||
* This name is now deprecated, but may still be used as an alternative form for
|
||||
* this option.
|
||||
*/
|
||||
//#define MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue