Skip to content

Commit b8bebd6

Browse files
committed
Fixes for ARM/Intel ASM support.
1 parent face8b6 commit b8bebd6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

zephyr/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ if(CONFIG_WOLFSSL)
141141
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/arm/armv8-chacha.c)
142142
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/arm/armv8-curve25519_c.c)
143143

144-
set(MCPU_FLAGS "-mcpu=cortex-a53+crypto -mstrict-align")
145-
#set(MCPU_FLAGS "-mcpu=generic+crypto -mstrict-align")
144+
# Note: The cmake/gcc-m-cpu.cmake make need updated to add "+crypto -mstrict-align"
145+
set(TOOLCHAIN_C_FLAGS "-mcpu=cortex-a53+crypto -mstrict-align")
146146
endif()
147147

148148
if(CONFIG_WOLFCRYPT_INTELASM)
@@ -153,10 +153,10 @@ if(CONFIG_WOLFSSL)
153153
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/chacha_asm.S)
154154
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/poly1305_asm.S)
155155

156-
# issues with aesni
157-
#zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_asm.S)
158-
#zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_gcm_x86_asm.S)
159-
#set(MCPU_FLAGS "-march=native -maes -msse4 -mpclmul ")
156+
# AESNI
157+
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_asm.S)
158+
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/aes_gcm_x86_asm.S)
159+
set(TOOLCHAIN_C_FLAGS "-march=native -maes -msse4 -mpclmul ")
160160
endif()
161161

162162
zephyr_library_link_libraries(wolfSSL)

zephyr/user_settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,13 @@ extern "C" {
388388
#define WOLFSSL_ARMASM
389389
#define WOLFSSL_NO_HASH_RAW
390390
#define WOLFSSL_ARMASM_INLINE /* use inline .c versions */
391-
#define WOLFSSL_ARMASM_NO_HW_CRYPTO /* enable if processor does not support aes/sha instructions */
392391
#define WOLFSSL_ARMASM_NO_NEON
393392

394393
/* Default is ARMv8 */
395394

396395
#if 0 /* ARMv7 */
397396
#define WOLFSSL_ARM_ARCH 7
397+
#define WOLFSSL_ARMASM_NO_HW_CRYPTO /* enable if processor does not support aes/sha instructions */
398398
#endif
399399
#endif
400400

0 commit comments

Comments
 (0)