-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SiliconLabsSoftware:main' into driver/access_point
- Loading branch information
Showing
26 changed files
with
1,088 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright (c) 2024 Silicon Laboratories Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_subdirectory_ifdef(CONFIG_SOC_FAMILY_SILABS_S2 simplicity_sdk) | ||
add_subdirectory_ifdef(CONFIG_HAS_SILABS_WISECONNECT wiseconnect) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Copyright (c) 2025 Silicon Laboratories Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set(SECURITY_DIR ${ZEPHYR_HAL_SILABS_MODULE_DIR}/simplicity_sdk/platform/security) | ||
|
||
# Get SoC series number, i.e. translate e.g. efr32bg22 -> 22 | ||
string(SUBSTRING ${CONFIG_SOC_SERIES} 7 2 SILABS_DEVICE_FAMILY_NUMBER) | ||
|
||
zephyr_include_directories( | ||
inc | ||
) | ||
|
||
zephyr_compile_definitions_ifdef(CONFIG_SOC_GECKO_SE | ||
SL_SE_MANAGER_THREADING | ||
) | ||
|
||
set(vse_device_families 22 27) | ||
if(NOT (SILABS_DEVICE_FAMILY_NUMBER IN_LIST vse_device_families)) | ||
zephyr_compile_definitions_ifdef(CONFIG_SOC_GECKO_SE | ||
SL_SE_MANAGER_YIELD_WHILE_WAITING_FOR_COMMAND_COMPLETION | ||
) | ||
endif() | ||
|
||
# PSA Crypto | ||
if(CONFIG_PSA_CRYPTO_DRIVER_SILABS_HSE OR CONFIG_PSA_CRYPTO_DRIVER_SILABS_VSE) | ||
|
||
zephyr_library_named(hal_silabs_crypto) | ||
|
||
zephyr_include_directories( | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/inc | ||
${SECURITY_DIR}/sl_component/sl_mbedtls_support/config | ||
${SECURITY_DIR}/sl_component/sl_mbedtls_support/inc | ||
) | ||
zephyr_compile_definitions( | ||
MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE="sl_psa_crypto_config_zephyr.h" | ||
) | ||
zephyr_library_sources( | ||
# ${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_psa_driver_common.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_psa_driver_ghash.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_psa_driver_init.c | ||
# ${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_psa_trng.c | ||
) | ||
zephyr_library_link_libraries(mbedTLSBase) | ||
|
||
# HSE | ||
zephyr_library_sources_ifdef(CONFIG_PSA_CRYPTO_DRIVER_SILABS_HSE | ||
${SECURITY_DIR}/sl_component/se_manager/src/sl_se_manager_cipher.c | ||
${SECURITY_DIR}/sl_component/se_manager/src/sl_se_manager_hash.c | ||
${SECURITY_DIR}/sl_component/se_manager/src/sl_se_manager_key_derivation.c | ||
${SECURITY_DIR}/sl_component/se_manager/src/sl_se_manager_key_handling.c | ||
${SECURITY_DIR}/sl_component/se_manager/src/sl_se_manager_signature.c | ||
${SECURITY_DIR}/sl_component/se_manager/src/sl_se_manager_attestation.c | ||
|
||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_driver_aead.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_driver_builtin_keys.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_driver_mac.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_driver_signature.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_transparent_driver_aead.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c | ||
${SECURITY_DIR}/sl_component/sl_psa_driver/src/sli_se_version_dependencies.c | ||
) | ||
|
||
# VSE | ||
# TODO | ||
|
||
endif() # PSA Crypto |
19 changes: 19 additions & 0 deletions
19
modules/hal_silabs/simplicity_sdk/inc/sl_mbedtls_config_zephyr.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) 2025 Silicon Laboratories Inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
#ifndef SL_MBEDTLS_CONFIG_ZEPHYR_H | ||
#define SL_MBEDTLS_CONFIG_ZEPHYR_H | ||
|
||
#include "sli_mbedtls_omnipresent.h" | ||
|
||
/* Legacy mbed TLS ALT APIs are not accelerated in Zephyr | ||
* #include "sli_mbedtls_acceleration.h" | ||
*/ | ||
|
||
/* From sl_mbedtls_device_config.h */ | ||
#define SL_SE_SUPPORT_FW_PRIOR_TO_1_2_2 0 | ||
#define SL_SE_ASSUME_FW_AT_LEAST_1_2_2 1 | ||
#define SL_SE_ASSUME_FW_UNAFFECTED_BY_ED25519_ERRATA 0 | ||
|
||
#endif |
24 changes: 24 additions & 0 deletions
24
modules/hal_silabs/simplicity_sdk/inc/sl_psa_crypto_config_zephyr.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2025 Silicon Laboratories Inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
#ifndef SL_PSA_CRYPTO_CONFIG_ZEPHYR_H | ||
#define SL_PSA_CRYPTO_CONFIG_ZEPHYR_H | ||
|
||
#if defined(CONFIG_PSA_CRYPTO_DRIVER_SILABS_HSE) | ||
#define PSA_CRYPTO_DRIVER_SILABS_HSE | ||
#endif | ||
|
||
#if defined(CONFIG_PSA_CRYPTO_DRIVER_SILABS_VSE) | ||
#define PSA_CRYPTO_DRIVER_SILABS_VSE | ||
#endif | ||
|
||
/* Should be exposed as Kconfig in the future */ | ||
#define SL_SE_BUILTIN_KEY_AES128_ALG_CONFIG (PSA_ALG_CTR) | ||
#define SL_CRYPTOACC_BUILTIN_KEY_PUF_ALG (PSA_ALG_PBKDF2_AES_CMAC_PRF_128) | ||
#define SL_VSE_BUFFER_TRNG_DATA_DURING_SLEEP (0) | ||
#define SL_VSE_MAX_TRNG_WORDS_BUFFERED_DURING_SLEEP (63) | ||
|
||
#include "sli_psa_acceleration.h" | ||
|
||
#endif |
Oops, something went wrong.