Rename MBEDTLS_SHAxxx_USE_ARMV8_yyy to MBEDTLS_SHAxxx_USE_ARMV8_A_yyy
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
fe9fda81aa
commit
5b89c55bb8
7 changed files with 140 additions and 140 deletions
|
@ -829,44 +829,44 @@
|
|||
#error "MBEDTLS_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT) && \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
#error "Must only define one of MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*"
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) && \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
#error "Must only define one of MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
#if !defined(MBEDTLS_SHA512_C)
|
||||
#error "MBEDTLS_SHA512_USE_ARMV8_CRYPTO_* defined without MBEDTLS_SHA512_C"
|
||||
#error "MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_* defined without MBEDTLS_SHA512_C"
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA512_ALT) || defined(MBEDTLS_SHA512_PROCESS_ALT)
|
||||
#error "MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*"
|
||||
#error "MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*"
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY */
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY) && !defined(__aarch64__)
|
||||
#error "MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY defined on non-Aarch64 system"
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY) && !defined(__aarch64__)
|
||||
#error "MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY defined on non-Aarch64 system"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) && \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
#error "Must only define one of MBEDTLS_SHA256_USE_ARMV8_CRYPTO_*"
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) && \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
#error "Must only define one of MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
#if !defined(MBEDTLS_SHA256_C)
|
||||
#error "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_* defined without MBEDTLS_SHA256_C"
|
||||
#error "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_* defined without MBEDTLS_SHA256_C"
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA256_ALT) || defined(MBEDTLS_SHA256_PROCESS_ALT)
|
||||
#error "MBEDTLS_SHA256_*ALT can't be used with MBEDTLS_SHA256_USE_ARMV8_CRYPTO_*"
|
||||
#error "MBEDTLS_SHA256_*ALT can't be used with MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY) && !defined(MBEDTLS_ARCH_IS_ARMV8_A)
|
||||
#error "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY defined on non-Armv8-A system"
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY) && !defined(MBEDTLS_ARCH_IS_ARMV8_A)
|
||||
#error "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY defined on non-Armv8-A system"
|
||||
#endif
|
||||
|
||||
/* TLS 1.3 requires separate HKDF parts from PSA,
|
||||
|
|
|
@ -187,18 +187,18 @@
|
|||
/* 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) && \
|
||||
!defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
!defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
#define MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY) && !defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
#if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY) && !defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
#define MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT) && \
|
||||
!defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
!defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
#endif
|
||||
#if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY) && !defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY
|
||||
#if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY) && !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY
|
||||
#endif
|
||||
|
||||
#endif /* MBEDTLS_CONFIG_ADJUST_LEGACY_CRYPTO_H */
|
||||
|
|
|
@ -3270,13 +3270,13 @@
|
|||
#define MBEDTLS_SHA256_C
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
* \def MBEDTLS_SHA256_USE_ARMV8_A_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_ARMV8_CRYPTO_IF_PRESENT is defined when building
|
||||
* \note If MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT is defined when building
|
||||
* for a non-Armv8-A build it will be silently ignored.
|
||||
*
|
||||
* \note Minimum compiler versions for this feature are Clang 4.0,
|
||||
|
@ -3289,8 +3289,8 @@
|
|||
* 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.
|
||||
* \warning MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT cannot be defined at the
|
||||
* same time as MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA256_C.
|
||||
*
|
||||
|
@ -3299,24 +3299,24 @@
|
|||
* Uncomment to have the library check for the Armv8-A SHA-256 crypto extensions
|
||||
* and use them if available.
|
||||
*/
|
||||
//#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
//#define MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT.
|
||||
* \deprecated This is now known as MBEDTLS_SHA256_USE_ARMV8_A_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_ARMV8_CRYPTO_ONLY
|
||||
* \def MBEDTLS_SHA256_USE_ARMV8_A_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_ARMV8_CRYPTO_IF_PRESENT
|
||||
* MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
*
|
||||
* \note Minimum compiler versions for this feature are Clang 4.0,
|
||||
* armclang 6.6 or GCC 6.0.
|
||||
|
@ -3328,8 +3328,8 @@
|
|||
* 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.
|
||||
* \warning MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY cannot be defined at the same
|
||||
* time as MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA256_C.
|
||||
*
|
||||
|
@ -3338,10 +3338,10 @@
|
|||
* Uncomment to have the library use the Armv8-A SHA-256 crypto extensions
|
||||
* unconditionally.
|
||||
*/
|
||||
//#define MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
//#define MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY.
|
||||
* \deprecated This is now known as MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY.
|
||||
* This name is now deprecated, but may still be used as an alternative form for
|
||||
* this option.
|
||||
*/
|
||||
|
@ -3390,13 +3390,13 @@
|
|||
#define MBEDTLS_SHA3_C
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
* \def MBEDTLS_SHA512_USE_ARMV8_A_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_ARMV8_CRYPTO_IF_PRESENT is defined when building
|
||||
* \note If MBEDTLS_SHA512_USE_ARMV8_A_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,
|
||||
|
@ -3409,8 +3409,8 @@
|
|||
* 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.
|
||||
* \warning MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT cannot be defined at the
|
||||
* same time as MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA512_C.
|
||||
*
|
||||
|
@ -3419,24 +3419,24 @@
|
|||
* Uncomment to have the library check for the Armv8-A SHA-512 crypto extensions
|
||||
* and use them if available.
|
||||
*/
|
||||
//#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
//#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT.
|
||||
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_A_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_ARMV8_CRYPTO_ONLY
|
||||
* \def MBEDTLS_SHA512_USE_ARMV8_A_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_ARMV8_CRYPTO_IF_PRESENT
|
||||
* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
*
|
||||
* \note Minimum compiler versions for this feature are Clang 7.0,
|
||||
* armclang 6.9 or GCC 8.0.
|
||||
|
@ -3448,8 +3448,8 @@
|
|||
* 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.
|
||||
* \warning MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY cannot be defined at the same
|
||||
* time as MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT.
|
||||
*
|
||||
* Requires: MBEDTLS_SHA512_C.
|
||||
*
|
||||
|
@ -3458,10 +3458,10 @@
|
|||
* Uncomment to have the library use the Armv8-A SHA-512 crypto extensions
|
||||
* unconditionally.
|
||||
*/
|
||||
//#define MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY
|
||||
//#define MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY
|
||||
|
||||
/*
|
||||
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY.
|
||||
* \deprecated This is now known as MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY.
|
||||
* This name is now deprecated, but may still be used as an alternative form for
|
||||
* this option.
|
||||
*/
|
||||
|
|
|
@ -72,34 +72,34 @@
|
|||
|
||||
#if defined(MBEDTLS_ARCH_IS_ARMV8_A)
|
||||
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
# ifdef __ARM_NEON
|
||||
# include <arm_neon.h>
|
||||
# else
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
# warning "Target does not support NEON instructions"
|
||||
# undef MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
# undef MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
# else
|
||||
# error "Target does not support NEON instructions"
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
# if !defined(__ARM_FEATURE_CRYPTO) || defined(MBEDTLS_ENABLE_ARM_CRYPTO_EXTENSIONS_COMPILER_FLAG)
|
||||
# if defined(__ARMCOMPILER_VERSION)
|
||||
# if __ARMCOMPILER_VERSION <= 6090000
|
||||
# error "Must use minimum -march=armv8-a+crypto for MBEDTLS_SHA256_USE_ARMV8_CRYPTO_*"
|
||||
# error "Must use minimum -march=armv8-a+crypto for MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*"
|
||||
# endif
|
||||
# pragma clang attribute push (__attribute__((target("sha2"))), apply_to=function)
|
||||
# define MBEDTLS_POP_TARGET_PRAGMA
|
||||
# elif defined(__clang__)
|
||||
# if __clang_major__ < 4
|
||||
# error "A more recent Clang is required for MBEDTLS_SHA256_USE_ARMV8_CRYPTO_*"
|
||||
# error "A more recent Clang is required for MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*"
|
||||
# endif
|
||||
# pragma clang attribute push (__attribute__((target("crypto"))), apply_to=function)
|
||||
# define MBEDTLS_POP_TARGET_PRAGMA
|
||||
|
@ -108,20 +108,20 @@
|
|||
* intrinsics are missing. Missing intrinsics could be worked around.
|
||||
*/
|
||||
# if __GNUC__ < 6
|
||||
# error "A more recent GCC is required for MBEDTLS_SHA256_USE_ARMV8_CRYPTO_*"
|
||||
# error "A more recent GCC is required for MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*"
|
||||
# else
|
||||
# pragma GCC push_options
|
||||
# pragma GCC target ("arch=armv8-a+crypto")
|
||||
# define MBEDTLS_POP_TARGET_PRAGMA
|
||||
# endif
|
||||
# else
|
||||
# error "Only GCC and Clang supported for MBEDTLS_SHA256_USE_ARMV8_CRYPTO_*"
|
||||
# error "Only GCC and Clang supported for MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*"
|
||||
# endif
|
||||
# endif
|
||||
/* *INDENT-ON* */
|
||||
|
||||
# endif
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
# if defined(__unix__)
|
||||
# if defined(__linux__)
|
||||
/* Our preferred method of detection is getauxval() */
|
||||
|
@ -133,19 +133,19 @@
|
|||
# endif
|
||||
# endif
|
||||
#elif defined(_M_ARM64)
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
# if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
# include <arm64_neon.h>
|
||||
# endif
|
||||
#else
|
||||
# undef MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
# undef MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
# undef MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
|
||||
# undef MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
/*
|
||||
* Capability detection code comes early, so we can disable
|
||||
* MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT if no detection mechanism found
|
||||
* MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT if no detection mechanism found
|
||||
*/
|
||||
#if defined(MBEDTLS_ARCH_IS_ARM64) && defined(HWCAP_SHA2)
|
||||
static int mbedtls_a64_crypto_sha256_determine_support(void)
|
||||
|
@ -222,10 +222,10 @@ static int mbedtls_a64_crypto_sha256_determine_support(void)
|
|||
}
|
||||
#else
|
||||
#warning "No mechanism to detect ARMV8_CRYPTO found, using C code only"
|
||||
#undef MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
#undef MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
#endif /* HWCAP_SHA2, __APPLE__, __unix__ && SIG_SETMASK */
|
||||
|
||||
#endif /* MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT */
|
||||
#endif /* MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT */
|
||||
|
||||
#if !defined(MBEDTLS_SHA256_ALT)
|
||||
|
||||
|
@ -327,10 +327,10 @@ static const uint32_t K[] =
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
# define mbedtls_internal_sha256_process_many_a64_crypto mbedtls_internal_sha256_process_many
|
||||
# define mbedtls_internal_sha256_process_a64_crypto mbedtls_internal_sha256_process
|
||||
#endif
|
||||
|
@ -430,7 +430,7 @@ static size_t mbedtls_internal_sha256_process_many_a64_crypto(
|
|||
return processed;
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
/*
|
||||
* This function is for internal use only if we are building both C and Armv8
|
||||
* versions, otherwise it is renamed to be the public mbedtls_internal_sha256_process()
|
||||
|
@ -445,7 +445,7 @@ int mbedtls_internal_sha256_process_a64_crypto(mbedtls_sha256_context *ctx,
|
|||
SHA256_BLOCK_SIZE) ? 0 : -1;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT || MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY */
|
||||
#endif /* MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT || MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY */
|
||||
|
||||
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
|
||||
#if defined(__clang__)
|
||||
|
@ -456,14 +456,14 @@ int mbedtls_internal_sha256_process_a64_crypto(mbedtls_sha256_context *ctx,
|
|||
#undef MBEDTLS_POP_TARGET_PRAGMA
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if !defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
#define mbedtls_internal_sha256_process_many_c mbedtls_internal_sha256_process_many
|
||||
#define mbedtls_internal_sha256_process_c mbedtls_internal_sha256_process
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_SHA256_PROCESS_ALT) && \
|
||||
!defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
!defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
|
||||
#define SHR(x, n) (((x) & 0xFFFFFFFF) >> (n))
|
||||
#define ROTR(x, n) (SHR(x, n) | ((x) << (32 - (n))))
|
||||
|
@ -491,7 +491,7 @@ int mbedtls_internal_sha256_process_a64_crypto(mbedtls_sha256_context *ctx,
|
|||
(d) += local.temp1; (h) = local.temp1 + local.temp2; \
|
||||
} while (0)
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
/*
|
||||
* This function is for internal use only if we are building both C and Armv8
|
||||
* versions, otherwise it is renamed to be the public mbedtls_internal_sha256_process()
|
||||
|
@ -583,10 +583,10 @@ int mbedtls_internal_sha256_process_c(mbedtls_sha256_context *ctx,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !MBEDTLS_SHA256_PROCESS_ALT && !MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY */
|
||||
#endif /* !MBEDTLS_SHA256_PROCESS_ALT && !MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY */
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if !defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
|
||||
static size_t mbedtls_internal_sha256_process_many_c(
|
||||
mbedtls_sha256_context *ctx, const uint8_t *data, size_t len)
|
||||
|
@ -607,10 +607,10 @@ static size_t mbedtls_internal_sha256_process_many_c(
|
|||
return processed;
|
||||
}
|
||||
|
||||
#endif /* !MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY */
|
||||
#endif /* !MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY */
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
|
||||
static int mbedtls_a64_crypto_sha256_has_support(void)
|
||||
{
|
||||
|
@ -645,7 +645,7 @@ int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT */
|
||||
#endif /* MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT */
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
#include "mbedtls/platform.h"
|
||||
|
||||
#if defined(__aarch64__)
|
||||
# if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
# if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
/* *INDENT-OFF* */
|
||||
# ifdef __ARM_NEON
|
||||
# include <arm_neon.h>
|
||||
|
@ -83,35 +83,35 @@
|
|||
/* Test Clang first, as it defines __GNUC__ */
|
||||
# if defined(__ARMCOMPILER_VERSION)
|
||||
# if __ARMCOMPILER_VERSION < 6090000
|
||||
# error "A more recent armclang is required for MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*"
|
||||
# error "A more recent armclang is required for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*"
|
||||
# elif __ARMCOMPILER_VERSION == 6090000
|
||||
# error "Must use minimum -march=armv8.2-a+sha3 for MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*"
|
||||
# error "Must use minimum -march=armv8.2-a+sha3 for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*"
|
||||
# else
|
||||
# pragma clang attribute push (__attribute__((target("sha3"))), apply_to=function)
|
||||
# define MBEDTLS_POP_TARGET_PRAGMA
|
||||
# endif
|
||||
# elif defined(__clang__)
|
||||
# if __clang_major__ < 7
|
||||
# error "A more recent Clang is required for MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*"
|
||||
# error "A more recent Clang is required for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*"
|
||||
# else
|
||||
# pragma clang attribute push (__attribute__((target("sha3"))), apply_to=function)
|
||||
# define MBEDTLS_POP_TARGET_PRAGMA
|
||||
# endif
|
||||
# elif defined(__GNUC__)
|
||||
# if __GNUC__ < 8
|
||||
# error "A more recent GCC is required for MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*"
|
||||
# error "A more recent GCC is required for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*"
|
||||
# else
|
||||
# pragma GCC push_options
|
||||
# pragma GCC target ("arch=armv8.2-a+sha3")
|
||||
# define MBEDTLS_POP_TARGET_PRAGMA
|
||||
# endif
|
||||
# else
|
||||
# error "Only GCC and Clang supported for MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*"
|
||||
# error "Only GCC and Clang supported for MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*"
|
||||
# endif
|
||||
# endif
|
||||
/* *INDENT-ON* */
|
||||
# endif
|
||||
# if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
# if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
# if defined(__unix__)
|
||||
# if defined(__linux__)
|
||||
/* Our preferred method of detection is getauxval() */
|
||||
|
@ -122,19 +122,19 @@
|
|||
# endif
|
||||
# endif
|
||||
#elif defined(_M_ARM64)
|
||||
# if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
# if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
# include <arm64_neon.h>
|
||||
# endif
|
||||
#else
|
||||
# undef MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY
|
||||
# undef MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
# undef MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY
|
||||
# undef MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
/*
|
||||
* Capability detection code comes early, so we can disable
|
||||
* MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT if no detection mechanism found
|
||||
* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT if no detection mechanism found
|
||||
*/
|
||||
#if defined(HWCAP_SHA512)
|
||||
static int mbedtls_a64_crypto_sha512_determine_support(void)
|
||||
|
@ -211,10 +211,10 @@ static int mbedtls_a64_crypto_sha512_determine_support(void)
|
|||
}
|
||||
#else
|
||||
#warning "No mechanism to detect ARMV8_CRYPTO found, using C code only"
|
||||
#undef MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
#undef MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
#endif /* HWCAP_SHA512, __APPLE__, __unix__ && SIG_SETMASK */
|
||||
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT */
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT */
|
||||
|
||||
#if !defined(MBEDTLS_SHA512_ALT)
|
||||
|
||||
|
@ -352,10 +352,10 @@ static const uint64_t K[80] =
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT) || \
|
||||
defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
# define mbedtls_internal_sha512_process_many_a64_crypto mbedtls_internal_sha512_process_many
|
||||
# define mbedtls_internal_sha512_process_a64_crypto mbedtls_internal_sha512_process
|
||||
#endif
|
||||
|
@ -567,7 +567,7 @@ static size_t mbedtls_internal_sha512_process_many_a64_crypto(
|
|||
return processed;
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
/*
|
||||
* This function is for internal use only if we are building both C and Armv8
|
||||
* versions, otherwise it is renamed to be the public mbedtls_internal_sha512_process()
|
||||
|
@ -582,7 +582,7 @@ int mbedtls_internal_sha512_process_a64_crypto(mbedtls_sha512_context *ctx,
|
|||
SHA512_BLOCK_SIZE) ? 0 : -1;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY */
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */
|
||||
|
||||
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
|
||||
#if defined(__clang__)
|
||||
|
@ -594,15 +594,15 @@ int mbedtls_internal_sha512_process_a64_crypto(mbedtls_sha512_context *ctx,
|
|||
#endif
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
#define mbedtls_internal_sha512_process_many_c mbedtls_internal_sha512_process_many
|
||||
#define mbedtls_internal_sha512_process_c mbedtls_internal_sha512_process
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_SHA512_PROCESS_ALT) && !defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if !defined(MBEDTLS_SHA512_PROCESS_ALT) && !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
/*
|
||||
* This function is for internal use only if we are building both C and Armv8
|
||||
* versions, otherwise it is renamed to be the public mbedtls_internal_sha512_process()
|
||||
|
@ -701,10 +701,10 @@ int mbedtls_internal_sha512_process_c(mbedtls_sha512_context *ctx,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !MBEDTLS_SHA512_PROCESS_ALT && !MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY */
|
||||
#endif /* !MBEDTLS_SHA512_PROCESS_ALT && !MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */
|
||||
|
||||
|
||||
#if !defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY)
|
||||
#if !defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY)
|
||||
|
||||
static size_t mbedtls_internal_sha512_process_many_c(
|
||||
mbedtls_sha512_context *ctx, const uint8_t *data, size_t len)
|
||||
|
@ -725,10 +725,10 @@ static size_t mbedtls_internal_sha512_process_many_c(
|
|||
return processed;
|
||||
}
|
||||
|
||||
#endif /* !MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY */
|
||||
#endif /* !MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY */
|
||||
|
||||
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT)
|
||||
#if defined(MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT)
|
||||
|
||||
static int mbedtls_a64_crypto_sha512_has_support(void)
|
||||
{
|
||||
|
@ -763,7 +763,7 @@ int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT */
|
||||
#endif /* MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT */
|
||||
|
||||
/*
|
||||
* SHA-512 process buffer
|
||||
|
|
|
@ -215,8 +215,8 @@ EXCLUDE_FROM_FULL = frozenset([
|
|||
'MBEDTLS_RSA_NO_CRT', # influences the use of RSA in X.509 and TLS
|
||||
'MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY', # interacts with *_USE_A64_CRYPTO_IF_PRESENT
|
||||
'MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY', # interacts with *_USE_A64_CRYPTO_IF_PRESENT
|
||||
'MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY', # interacts with *_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
'MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY', # interacts with *_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
'MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY', # interacts with *_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
'MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY', # interacts with *_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
'MBEDTLS_SSL_RECORD_SIZE_LIMIT', # in development, currently breaks other tests
|
||||
'MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN', # build dependency (clang+memsan)
|
||||
'MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND', # build dependency (valgrind headers)
|
||||
|
@ -282,8 +282,8 @@ EXCLUDE_FROM_BAREMETAL = frozenset([
|
|||
'MBEDTLS_TIMING_C', # requires a clock
|
||||
'MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
|
||||
'MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
|
||||
'MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
|
||||
'MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
|
||||
'MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
|
||||
'MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT', # requires an OS for runtime-detection
|
||||
])
|
||||
|
||||
def keep_in_baremetal(name):
|
||||
|
|
|
@ -2245,12 +2245,12 @@ component_build_module_alt () {
|
|||
# The SpecifiedECDomain parsing code accesses mbedtls_ecp_group fields
|
||||
# directly and assumes the implementation works with partial groups.
|
||||
scripts/config.py unset MBEDTLS_PK_PARSE_EC_EXTENDED
|
||||
# MBEDTLS_SHA256_*ALT can't be used with MBEDTLS_SHA256_USE_ARMV8_CRYPTO_*
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
# MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_ARMV8_CRYPTO_*
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_CRYPTO_ONLY
|
||||
# MBEDTLS_SHA256_*ALT can't be used with MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_*
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
|
||||
# MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_*
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_ONLY
|
||||
|
||||
# Enable all MBEDTLS_XXX_ALT for whole modules. Do not enable
|
||||
# MBEDTLS_XXX_YYY_ALT which are for single functions.
|
||||
|
@ -3464,10 +3464,10 @@ config_psa_crypto_hash_use_psa () {
|
|||
scripts/config.py unset MBEDTLS_SHA1_C
|
||||
scripts/config.py unset MBEDTLS_SHA224_C
|
||||
scripts/config.py unset MBEDTLS_SHA256_C # see external RNG below
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA384_C
|
||||
scripts/config.py unset MBEDTLS_SHA512_C
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA3_C
|
||||
fi
|
||||
}
|
||||
|
@ -4332,7 +4332,7 @@ component_build_aes_aesce_armcc () {
|
|||
scripts/config.py baremetal
|
||||
|
||||
# armc[56] don't support SHA-512 intrinsics
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
|
||||
# Stop armclang warning about feature detection for A64_CRYPTO.
|
||||
# With this enabled, the library does build correctly under armclang,
|
||||
|
@ -4340,7 +4340,7 @@ component_build_aes_aesce_armcc () {
|
|||
# unavailable, and the user is notified via a #warning. So enabling
|
||||
# this feature would prevent us from building with -Werror on
|
||||
# armclang. Tracked in #7198.
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py set MBEDTLS_HAVE_ASM
|
||||
|
||||
msg "AESCE, build with default configuration."
|
||||
|
@ -4362,36 +4362,36 @@ support_build_sha_armce() {
|
|||
|
||||
component_build_sha_armce () {
|
||||
# Test variations of SHA256 Armv8 crypto extensions
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py set MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py set MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
|
||||
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY clang, aarch64"
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY clang, aarch64"
|
||||
make -B library/sha256.o CC=clang CFLAGS="--target=aarch64-linux-gnu -march=armv8-a"
|
||||
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY clang, arm"
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY clang, arm"
|
||||
make -B library/sha256.o CC=clang CFLAGS="--target=arm-linux-gnueabihf -mcpu=cortex-a72+crypto -marm"
|
||||
|
||||
# test the deprecated form of the config option
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
|
||||
scripts/config.py set MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY
|
||||
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY clang, thumb"
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY clang, thumb"
|
||||
make -B library/sha256.o CC=clang CFLAGS="--target=arm-linux-gnueabihf -mcpu=cortex-a32+crypto -mthumb"
|
||||
|
||||
scripts/config.py set MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_ONLY
|
||||
scripts/config.py set MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_ONLY
|
||||
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT clang, aarch64"
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT clang, aarch64"
|
||||
make -B library/sha256.o CC=clang CFLAGS="--target=aarch64-linux-gnu -march=armv8-a"
|
||||
|
||||
# test the deprecated form of the config option
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
scripts/config.py set MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
|
||||
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT clang, arm"
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT clang, arm"
|
||||
make -B library/sha256.o CC=clang CFLAGS="--target=arm-linux-gnueabihf -mcpu=cortex-a72+crypto -marm -std=c99"
|
||||
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT clang, thumb"
|
||||
msg "MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT clang, thumb"
|
||||
make -B library/sha256.o CC=clang CFLAGS="--target=arm-linux-gnueabihf -mcpu=cortex-a32+crypto -mthumb"
|
||||
}
|
||||
|
||||
|
@ -4936,7 +4936,7 @@ component_build_armcc () {
|
|||
msg "build: ARM Compiler 5"
|
||||
scripts/config.py baremetal
|
||||
# armc[56] don't support SHA-512 intrinsics
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
|
||||
# Stop armclang warning about feature detection for A64_CRYPTO.
|
||||
# With this enabled, the library does build correctly under armclang,
|
||||
|
@ -4944,7 +4944,7 @@ component_build_armcc () {
|
|||
# unavailable, and the user is notified via a #warning. So enabling
|
||||
# this feature would prevent us from building with -Werror on
|
||||
# armclang. Tracked in #7198.
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA256_USE_ARMV8_A_CRYPTO_IF_PRESENT
|
||||
|
||||
scripts/config.py set MBEDTLS_HAVE_ASM
|
||||
|
||||
|
|
Loading…
Reference in a new issue