Fixes for ARM/Intel ASM support.

This commit is contained in:
David Garske 2024-03-20 13:14:05 -07:00
parent face8b6e43
commit b8bebd6196
2 changed files with 7 additions and 7 deletions

View File

@ -141,8 +141,8 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/arm/armv8-chacha.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/arm/armv8-curve25519_c.c)
set(MCPU_FLAGS "-mcpu=cortex-a53+crypto -mstrict-align")
#set(MCPU_FLAGS "-mcpu=generic+crypto -mstrict-align")
# Note: The cmake/gcc-m-cpu.cmake make need updated to add "+crypto -mstrict-align"
set(TOOLCHAIN_C_FLAGS "-mcpu=cortex-a53+crypto -mstrict-align")
endif()
if(CONFIG_WOLFCRYPT_INTELASM)
@ -153,10 +153,10 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/chacha_asm.S)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/poly1305_asm.S)
# issues with aesni
#zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_asm.S)
#zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_gcm_x86_asm.S)
#set(MCPU_FLAGS "-march=native -maes -msse4 -mpclmul ")
# AESNI
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_asm.S)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_gcm_x86_asm.S)
set(TOOLCHAIN_C_FLAGS "-march=native -maes -msse4 -mpclmul ")
endif()
zephyr_library_link_libraries(wolfSSL)

View File

@ -388,13 +388,13 @@ extern "C" {
#define WOLFSSL_ARMASM
#define WOLFSSL_NO_HASH_RAW
#define WOLFSSL_ARMASM_INLINE /* use inline .c versions */
#define WOLFSSL_ARMASM_NO_HW_CRYPTO /* enable if processor does not support aes/sha instructions */
#define WOLFSSL_ARMASM_NO_NEON
/* Default is ARMv8 */
#if 0 /* ARMv7 */
#define WOLFSSL_ARM_ARCH 7
#define WOLFSSL_ARMASM_NO_HW_CRYPTO /* enable if processor does not support aes/sha instructions */
#endif
#endif