From 84ca4abe9c3a4b085ce48f0a3636d64c2faa5712 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Thu, 24 Oct 2024 17:46:08 +0200 Subject: [PATCH] Disable ARM_ASM on HW-accel and TZEN PKCS11 --- .github/workflows/test-configs.yml | 8 ++++---- arch.mk | 15 ++++----------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test-configs.yml b/.github/workflows/test-configs.yml index b34ba299d..4bd44470b 100644 --- a/.github/workflows/test-configs.yml +++ b/.github/workflows/test-configs.yml @@ -70,28 +70,28 @@ jobs: with: arch: arm config-file: ./config/examples/imx-rt1040.config - make-args: PKA=1 + make-args: PKA=1 NO_ARM_ASM=1 imx_rt1050_test_pka: uses: ./.github/workflows/test-build-mcux-sdk.yml with: arch: arm config-file: ./config/examples/imx-rt1050.config - make-args: PKA=1 + make-args: PKA=1 NO_ARM_ASM=1 imx_rt1060_test_pka: uses: ./.github/workflows/test-build-mcux-sdk.yml with: arch: arm config-file: ./config/examples/imx-rt1060.config - make-args: PKA=1 + make-args: PKA=1 NO_ARM_ASM=1 imx_rt1064_test_pka: uses: ./.github/workflows/test-build-mcux-sdk.yml with: arch: arm config-file: ./config/examples/imx-rt1064.config - make-args: PKA=1 + make-args: PKA=1 NO_ARM_ASM=1 kinetis_k64f_test: uses: ./.github/workflows/test-build-mcux-sdk.yml diff --git a/arch.mk b/arch.mk index bad4cdede..fd7665f26 100644 --- a/arch.mk +++ b/arch.mk @@ -233,13 +233,14 @@ else endif CFLAGS+=-mcmse ifeq ($(WOLFCRYPT_TZ),1) + CORTEXM_ARM_EXTRA_OBJS= + CORTEXM_ARM_EXTRA_CFLAGS= SECURE_OBJS+=./src/wc_callable.o SECURE_OBJS+=./lib/wolfssl/wolfcrypt/src/random.o CFLAGS+=-DWOLFCRYPT_SECURE_MODE SECURE_LDFLAGS+=-Wl,--cmse-implib -Wl,--out-implib=./src/wc_secure_calls.o endif endif # TZEN=1 - ifeq ($(NO_ASM),1) ifeq ($(SPMATH),1) ifeq ($(NO_ASM),1) MATH_OBJS += ./lib/wolfssl/wolfcrypt/src/sp_c32.o @@ -251,14 +252,6 @@ else endif endif else - ifeq ($(SPMATH),1) - CFLAGS+=-DWOLFSSL_SP_ASM -DWOLFSSL_SP_ARM_CORTEX_M_ASM - MATH_OBJS += ./lib/wolfssl/wolfcrypt/src/sp_cortexm.o - CFLAGS+=$(CORTEXM_ARM_EXTRA_CFLAGS) -DWOLFSSL_ARM_ARCH=8 - OBJS+=$(CORTEXM_ARM_EXTRA_OBJS) - endif - endif - else ifeq ($(CORTEX_M7),1) CFLAGS+=-mcpu=cortex-m7 LDFLAGS+=-mcpu=cortex-m7 @@ -271,9 +264,9 @@ else CFLAGS+=$(CORTEXM_ARM_EXTRA_CFLAGS) -DWOLFSSL_ARM_ARCH=7 OBJS+=$(CORTEXM_ARM_EXTRA_OBJS) endif - endif + endif else - ifeq ($(CORTEX_M0),1) + ifeq ($(CORTEX_M0),1) CFLAGS+=-mcpu=cortex-m0 LDFLAGS+=-mcpu=cortex-m0 ifeq ($(SPMATH),1)