Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion modules/hal_silabs/simplicity_sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

set(SECURITY_DIR ${ZEPHYR_HAL_SILABS_MODULE_DIR}/simplicity_sdk/platform/security)
set(LIBCRYPTOSOC_DIR ${ZEPHYR_HAL_SILABS_EXTRA_MODULE_DIR}/simplicity_sdk/util/third_party/crypto_ip/libcryptosoc)
set(MBEDTLS_DIR ${ZEPHYR_MBEDTLS_MODULE_DIR})

# Get SoC series number, i.e. translate efr32bg22 -> 22, mgm240p -> 24, simg301 -> 301
Expand Down Expand Up @@ -84,6 +85,42 @@ zephyr_library_sources_ifdef(CONFIG_PSA_CRYPTO_DRIVER_SILABS_HSE
)

# VSE
# TODO
zephyr_include_directories_ifdef(CONFIG_PSA_CRYPTO_DRIVER_SILABS_VSE
${LIBCRYPTOSOC_DIR}/include
${LIBCRYPTOSOC_DIR}/src
)
zephyr_library_sources_ifdef(CONFIG_PSA_CRYPTO_DRIVER_SILABS_VSE
${SECURITY_DIR}/sl_component/sl_psa_driver/src/cryptoacc_management.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_driver_key_derivation.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_driver_trng.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_opaque_driver_builtin_keys.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_opaque_driver_mac.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_transparent_driver_aead.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_transparent_driver_cipher.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_transparent_driver_hash.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_transparent_driver_key_derivation.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_transparent_driver_key_management.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_transparent_driver_mac.c
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_cryptoacc_transparent_driver_signature.c

${LIBCRYPTOSOC_DIR}/src/ba414ep_config.c
${LIBCRYPTOSOC_DIR}/src/ba431_config.c
${LIBCRYPTOSOC_DIR}/src/cryptodma_internal.c
${LIBCRYPTOSOC_DIR}/src/cryptolib_types.c
${LIBCRYPTOSOC_DIR}/src/sx_aes.c
${LIBCRYPTOSOC_DIR}/src/sx_blk_cipher.c
${LIBCRYPTOSOC_DIR}/src/sx_blk_cipher.h
${LIBCRYPTOSOC_DIR}/src/sx_dh_alg.c
${LIBCRYPTOSOC_DIR}/src/sx_ecc_curves.c
${LIBCRYPTOSOC_DIR}/src/sx_ecc_keygen_alg.c
${LIBCRYPTOSOC_DIR}/src/sx_ecdsa_alg.c
${LIBCRYPTOSOC_DIR}/src/sx_hash.c
${LIBCRYPTOSOC_DIR}/src/sx_math.c
${LIBCRYPTOSOC_DIR}/src/sx_memcmp.c
${LIBCRYPTOSOC_DIR}/src/sx_memcpy.c
${LIBCRYPTOSOC_DIR}/src/sx_primitives.c
${LIBCRYPTOSOC_DIR}/src/sx_rng.c
${LIBCRYPTOSOC_DIR}/src/sx_trng.c
)

endif() # PSA Crypto
4 changes: 3 additions & 1 deletion soc/silabs/silabs_s2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ config PSA_CRYPTO_SW_ONLY
config PSA_CRYPTO_DRIVER_SILABS_HSE
bool "PSA Crypto Driver for Secure Engine"
depends on $(dt_has_compat,$(DT_COMPAT_SILABS_GECKO_SEMAILBOX))
select SILABS_SISDK_SE
default y if !PSA_CRYPTO_SW_ONLY

config PSA_CRYPTO_DRIVER_SILABS_VSE
bool "PSA Crypto Driver for Virtual Secure Engine"
depends on $(dt_has_compat,$(DT_COMPAT_SILABS_GECKO_TRNG))
# default y if !PSA_CRYPTO_SW_ONLY
select SILABS_SISDK_SE
default y if !PSA_CRYPTO_SW_ONLY

config MBEDTLS_USER_CONFIG_ENABLE
default y if (PSA_CRYPTO_DRIVER_SILABS_HSE || PSA_CRYPTO_DRIVER_SILABS_VSE)
Expand Down
4 changes: 4 additions & 0 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ manifest:
- picolibc
- segger
- zcbor
- name: zephyr-hal-silabs-extra
remote: silabs
revision: 04ea2a26baf2d0a768ce5c8970a754bbdd71e9b1
path: modules/hal/silabs_extra
- name: zephyr-mbedtls
remote: silabs
revision: 43bb1e577e2accfaa135464bac181ed2a0cc0489
Expand Down