Replace SOC_SERIES_CH32V00X with SOC_SERIES_QINGKE_V2C to maintain
consistent naming across SOC series.
Signed-off-by: Jianxiong Gu <jianxiong.gu@outlook.com>
By making `MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG` depend on that neither
`CTR_DRBG_CSPRNG_GENERATOR` nor `PSA_CSPRNG_GENERATOR` is enabled so if
they are we automatically fall back to `MBEDTLS_PSA_CRYPTO_LEGACY_RNG`.
This combination is problematic because we get in a scenario where
`psa_generate_random()` => `get_random_data()` => `sys_csrand_get()` =>
`psa_generate_random()`.
Resolves#105626.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add TF_PSA_CRYPTO_PQCP_MLDSA_ENABLED and
TF_PSA_CRYPTO_PQCP_MLDSA_87_ENABLED Kconfigs to allow using MLDSA-87 in
Zephyr.
This commit also extends "config-tf-psa-crypto.h" as necesary.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
There should not be any TF-PSA-Crypto configuration done in
config-mbedtls.h anymore, so there is no reason to keep including this
file anymore.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
It has been removed starting with Mbed TLS 4.0.
This removal allows to improve how the TF-M NS interface is configured.
With this change, MBEDTLS_PSA_CRYPTO_CONFIG is not defined anymore so
we don't need to pass MBEDTLS_PSA_CRYPTO_CONFIG_FILE to prevent the
default configuration file from being included.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
It is not tested/maintained.
Introduce a new option to replace it: CONFIG_MBEDTLS_CUSTOM
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Add driver support for MCAN module on TI's MSPM0 G-Series MCUs.
The MCAN module supports both classic CAN and CAN FD protocols.
Signed-off-by: Santhosh Charles <santhosh@linumiz.com>
Signed-off-by: Jackson Farley <j-farley@ti.com>
Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
Enable the MCUX LMEM cache component when a SoC selects
HAS_MCUX_LMEM_CACHE.
This keeps LMEM header and source selection inside the HAL
component layer instead of requiring Zephyr-local include
path workarounds in the cache driver build.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
- For PSE84 without BL2, sign the TF-M secure image using imgtool
(The PSE84 bootloader requires images to include an
MCUboot-compatible header and trailer. To satisfy this
requirement, the TF-M secure image is signed using imgtool,
even when MCUboot (BL2) is not enabled.)
- The signed image is then used when merging the TF-M secure and
Zephyr non-secure images into a single tfm_merged.hex file
- Configure the board runner to flash tfm_merged.hex when building
for the M33 non-secure target
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
- Enable CONFIG_BUILD_WITH_TFM with medium profile and BL2 disabled.
- Add TFM_BOARD mapping for kit_pse84_eval to the "infineon/pse84"
- Pass -DIFX_EPC=epc2 CMake argument for PSE84 series builds.
- Fix flash memory map in the devicetree to work with TF-M
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Fix mbedTLS 4.x / TF-PSA-Crypto 1.x build support for Espressif
Wi-Fi and BLE drivers.
legacy_support.cmake:
- Remove redundant compile definitions (MBEDTLS_ECP_C,
MBEDTLS_BIGNUM_C, MBEDTLS_ECP_DP_SECP256R1_ENABLED) that are
auto-derived from PSA_WANT_* symbols by the
crypto_adjust_config_enable_builtins.h header. Defining them
explicitly causes -Werror redefinition failures.
- Remove MBEDTLS_ENTROPY_C which was removed in TF-PSA-Crypto
1.x (entropy is now automatically enabled).
Kconfig.tf-psa-crypto:
- Add MBEDTLS_PK_PARSE_C Kconfig symbol so it can be selected
by drivers that need mbedtls_pk_parse_key() without requiring
the full X.509 stack.
- Add MBEDTLS_X509_USE_C Kconfig symbol with proper dependency
selects (PK_PARSE_C, ASN1_PARSE_C) to replace header-level
derivation logic.
Kconfig.mbedtls:
- Add select MBEDTLS_X509_USE_C to X509_CRT_PARSE_C,
X509_CRL_PARSE_C and X509_CSR_PARSE_C entries.
config-mbedtls.h:
- Simplify MBEDTLS_X509_USE_C guard to use the new Kconfig
symbol directly instead of deriving from individual X509
parse configs.
config-tf-psa-crypto.h:
- Simplify MBEDTLS_PK_PARSE_C and MBEDTLS_ASN1_PARSE_C guards
to use Kconfig symbols directly. The MBEDTLS_X509_USE_C
dependency is now resolved through the Kconfig select chain.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
tx_job remains busy even after transmit_message finishes.
If ot thread handles the tx done (handle_tx_done) event
and tries to send another message will fail in run_tx_task
because the tx_job appears busy.
This will cause an assert to trigger in SubMac::BeginTransmit
This change makes handle_tx_done to wait for tx_job to free
before continuing.
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
The PDL has several ASSERT levels which can greatly increase footprint
when used. For example our clock drivers assert using float formatting
which means the large addition of float format functionality when
enabled.
Determine the PDL ASSERT level and enablement based on CONFIG_ASSERT.
Flash usage for hello_world shows about a 20% improvement.
hello_world on PSOC Edge 84 M33 with this and ASSERT=n ~37K
hello_world on PSOC Edge 84 M33 before this change and ASSERT=n ~44K
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
Add a Zephyr-side module directory for hal_espressif with
Kconfig symbols that control HAL log output at compile time:
- ESP_HAL_LOG_LEVEL: gates ESP_LOGx macros (printk backend)
- ESP_HAL_EARLY_LOG_LEVEL: gates ESP_EARLY_LOGx and
ESP_DRAM_LOGx macros (esp_rom_printf backend)
The esp_log.h header itself lives in the HAL repository,
keeping all logging macro definitions in one place.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This Kconfig enables legacy Mbed TLS crypto support that is now no more
available. Kconfig OPENTHREAD_CRYPTO_PSA_CONFIG was already the default
and now it's left as the only choice.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
- replace legacy Kconfigs with corresponding PSA_WANT ones.
- extend Mbed TLS' CMake file in order to include these legacy ecdh module
that was removed from TF-PSA-Crypto when ESP32 BT and WiFi drivers are
built.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Select only PSA_WANT and remove usage of legacy crypto.
Extend also Mbed TLS's CMake to build a library which includes legacy
Mbed TLS crypto modules that were removed from TF-PSA-Crypto.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This allows NS app to have these headers available at build time without
any need to extend its CMake file to explicitly link to "tfm_api"
zephyr library.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This is temporary as TF-M is supposed to jump to TF-PSA-Crypto soon.
However since also Zephyr is transitioning to Mbed TLS/TF-PSA-Crypto right
now, it's better to limit to number of simultaneous changes, so for the
time keep TF-M relying on Mbed TLS 3.6.
In order to keep building with Mbed TLS 3.6 the previous configuration
header file is resumed and renamed appropriately.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add a Kconfig which still allows to get access to legacy (now internal)
Mbed TLS crypto.
Legacy header files are copied out of the private folder into the
build directory and the folder is the added to the Zephyr build.
Morevoer MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS is also set in the Mbed TLS
build in order to access functions and macros that wouldn't be
accessible otherwise.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add Kconfig to differentiate beetween Mbed TLS 3.x and 4.x versions.
This is used in MCUboot to differentiate the crypto support between legacy
3.x and 4.x (which in this case is provided by tf-psa-crypto).
Warning:
This Kconfig _cannot_ be an integer value, but it must be a boolean.
Having it as "int" would be a more natural solution, but here's the
reasons for which this approach doesn't work:
- currently on the Zephyr "main" branch this Kconfig is not defined, but
MCUboot is tested against the current "main". When not defined, adding
conditions like "myKconfig >= 4" in MCUboot _always_ evalutate to true
thus giving the wrong result.
- when defined, as it will be after this commit, will cause MCUboot's
Kconfig to complain because guards like "depends on myKconfig" cannot
be added because that's trying to get a boolean value out of an
integer value.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This is necessary to resolve a wrong dependency between build symbols
that should be moved to Kconfig in the future.
The comments added in this commit explain this in detail.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
"config-psa.h" contains all the Kconfig -> build symbols matching for
the "PSA_WANT_xxx", whereas "config-tf-psa-crypto.h" contains the same
mapping for the "MBEDTLS_xxx" stuff. However tf-psa-crypto wants a single
file with all the configurations in it, so let the latter include
the former.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
tf-psa-crypto deprecated usage of some build symbols and if they are
still specified at build time the build will fail.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
ENTROPY_C is now an internal module in tf-psa-crypto so it cannot be
included directly. So first thing all error codes are changed to
standard Zephyr ones.
Moreover MBEDTLS_ENTROPY_HARDWARE_ALT, MBEDTLS_NO_PLATFORM_ENTROPY and
MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES were removed. Now the platform must
define MBEDTLS_PSA_DRIVER_GET_ENTROPY when not using
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG.
Due to the build symbol name change CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR
is modified to CONFIG_MBEDTLS_PSA_DRIVER_GET_ENTROPY to make a 1:1
match between Kconfig and build symbol.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
TF-PSA-Crypto now requires a different configuration header file compared
to Mbed TLS. This commit adds 2 files:
- Kconfig.tf-psa-crypto
- config-tf-psa-crypto.h
which behave exactly the same as for their Mbed TLS counterparts, but for
TF-PSA-Crypto.
Kconfigs and #defines were migrated from Mbed TLS to TF-PSA-Crypto. This
commit didn't implement any re-organization/cleanup/change, but it's just
moving lines between files.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since Mbed TLS and TF-PSA-Crypto are now build based on CMake files as
well, instead of manually selecting source files, include folders and
building libraries, simply use "add_subdirectory()" and then link the
generated libraries.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
MCXL family is not supported in hal_nxp module.
Enable HAS_MCUX symbol for MCXL family in Kconfig. Add hal drivers
which are included by MCXL power driver in drivers cmake. Add mcxl
family to condition in drivers.cmake to use mcx_cmc driver.
Signed-off-by: Michal Smola <michal.smola@nxp.com>
Add platform shims, FreeRTOS compatibility layer, and linker scripts
to support the BL702 on-chip BLE controller binary blob under Zephyr.
The BLE blob expects a FreeRTOS environment and vendor HAL functions.
This commit provides:
- FreeRTOS API shim (xTaskCreate, xQueueGenericSend, pvPortMalloc,
etc.) mapping to Zephyr kernel primitives (k_thread, k_msgq,
k_malloc)
- Platform shims for bl_irq_*, bl_timer_*, BL702_Delay_*, GLB_*,
and UART stub functions the blob references
- RF calibration callbacks required by libbl702_rf.a
- Linker scripts placing BLE/FreeRTOS ROM writable data regions and
__global_pointer$ for GP-relative addressing from ROM code
- ROM function address table (PROVIDE symbols) as fallback for
un-shimmed FreeRTOS functions
- HAL module CMakeLists selecting controller library variant and
linking BLE/RF blobs
- Exchange memory configuration (8KB) when BLE is enabled
- RISCV_NO_MTVAL_ON_FP_TRAP selection for FPU trap handling
Signed-off-by: William Markezana <william.markezana@gmail.com>
Select the correct radio sequencer image on xG24 and xG26 at
compile time instead of deferring the selection to runtime.
This saves 16 kB of the binary size.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Enable `PSA_WANT_ALG_HMAC` in ciphersuites that enable
`PSA_WANT_ALG_TLS12_PRF`.
The former is a dependency of the latter which Mbed TLS enables
automatically in its configuration files but not all PSA Crypto
implementations do that.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Use CONFIG_SOC_SERIES_IMXRT118X as judgement for NETC driver
configuration to support all RT1180 derivative parts
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add counter driver based alarm_micro.c implementation to get better
micro-second accuracy for the APIs.
Signed-off-by: sree sreerajatha <sree.sreerajatha@silabs.com>
Split the milli/micro second APIs in OpenThread alarm implementation
so that it is easier to have multiple driver implementations
for them.
Signed-off-by: sree sreerajatha <sree.sreerajatha@silabs.com>
Add counter driver test so that it can build with BUILD_ONLY_NO_BLOBS
and successfully use RAIL stubs defined in blob_stub.c
Signed-off-by: sree sreerajatha <sree.sreerajatha@silabs.com>
Replace the TODO comment with actual Kconfig-based control of the
USB_DEVICE_CONFIG_SOF_NOTIFICATIONS macro. The macro is now only
defined when CONFIG_UDC_ENABLE_SOF is enabled, allowing users to
control SOF (Start of Frame) notifications through Kconfig instead
of having it always enabled.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
BL702L and BL616 BLE controller blobs use btblecontroller_* wrapper
symbols instead of raw FreeRTOS APIs. This port maps those wrappers
to Zephyr kernel primitives (k_thread, k_msgq, k_heap).
All internal allocations use the dedicated shim heap pool
(CONFIG_BFLB_SHIM_HEAP_SIZE) rather than the system heap.
Gated by CONFIG_BFLB_BTBLE_PORT_OS_SHIM, selected by SoC-specific
BLE drivers that use the btblecontroller API.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Multiple Bouffalo Lab SoCs (BL602, BL702) ship BLE controller blobs
that call FreeRTOS APIs directly (xTaskCreate, xQueueGenericSend,
pvPortMalloc, etc.). This shim maps those calls to Zephyr kernel
primitives so the same abstraction can be shared across SoC ports.
All internal allocations (threads, stacks, queues) use a dedicated
K_HEAP pool (CONFIG_BFLB_SHIM_HEAP_SIZE) instead of the system
heap, keeping shim memory bounded and separate.
Add CONFIG_BFLB_FREERTOS_SHIM (bool, selected by SoC BLE drivers).
Signed-off-by: William Markezana <william.markezana@gmail.com>
Add Silabs General GPCRC driver for Series 2 boards
Enable crc sample and test cases for Silabs series 2
Tested on real boards and compared result with all CRC16
and CRC32-IEEE algorithm
Signed-off-by: Phuc Hoang <donp172748@gmail.com>
This commit refactors the Realtek OSIF (Operating System Interface)
implementation to support multiple SoCs within the Bee family and
introduces support for the RTL8752H series.
Previously, the OSIF implementation was tightly coupled with the
RTL87x2G series. To facilitate the addition of new SoCs, the
architecture has been restructured into a common layer and
SoC-specific layers:
1. Common Layer: The generic Zephyr wrapper implementations have
been moved to `osif/common/osif_zephyr_impl.c`. This code is
now shared across different Realtek SoCs.
2. SoC-specific Layer: The function pointer assignments (ROM patch
initialization) are now separated into SoC-specific files
(e.g., `osif_zephyr_patch.c`).
Based on this new architecture, the RTL8752H series support is added
by providing its specific patch initialization while reusing the
common Zephyr wrappers.
The file structure changes are as follows:
- generic wrappers: Moved to `osif/common/osif_zephyr_impl.c`
- RTL87x2G patch: Moved to `osif/rtl87x2g/osif_zephyr_patch.c`
- RTL8752H patch: Added in `osif/rtl8752h/osif_zephyr_patch.c`
Signed-off-by: Zhiyuan Tang <zhiyuan_tang@realsil.com.cn>
- Add NBU pinmux to configure HDI mode with external radio
- Define nbu_handler to the MU interrupt handler
- Enable TSTMR0 clock at init
- Enable connectivity framework, MCMGR, rpmsg-lite
- Enable MU driver when selecting NXP_RF_IMU
- Disable LPUART1 to avoid pin conflicts with radio interface
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>