diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index acc3c8543..0b2680557 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -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) diff --git a/zephyr/user_settings.h b/zephyr/user_settings.h index 32bae9c8b..8c8f2e303 100644 --- a/zephyr/user_settings.h +++ b/zephyr/user_settings.h @@ -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