This makes for a not so pretty regex, so there might be better options,
meanwhile this ensures that what are effectively API symbols are
properly documented and visible in the API documentation.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The test thread and the system workqueue have the same priority,
mostly some specific CAN driver threads a lower preemptive priority,
so it is a bit arbitrary whether the workqueue cleans up the send
context before the next send.
Signed-off-by: Stephan Linz <linz@li-pro.net>
The LPTIM timer driver previously had hardcoded assumptions about
using LPTIM1 or LPTIM3, which prevented it from working with other
LPTIM instances like LPTIM2, LPTIM4, LPTIM5, and LPTIM6.
This change makes the driver work with any LPTIM instance by:
1. Adding lptim_enable_autonomous_mode() function that dynamically
detects which LPTIM instance is in use and enables autonomous
mode for instances that support it (LPTIM1, LPTIM3, LPTIM4).
LPTIM2, LPTIM5, LPTIM6 do not support autonomous mode.
2. Adding lptim_freeze_during_debug() function that handles debug
freeze configuration for all LPTIM instances across different
APB buses:
- LPTIM1: APB1_GRP1, APB3_GRP1, or APB7_GRP1
- LPTIM2: APB1_GRP1, APB1_GRP2, APB3_GRP1, or APB4_GRP1
- LPTIM3: APB1_GRP2, APB3_GRP1, or APB4_GRP1
- LPTIM4: APB3_GRP1 or APB4_GRP1
- LPTIM5: APB3_GRP1
- LPTIM6: APB3_GRP1
Both functions use DT_REG_ADDR() to compare the base address of the
configured LPTIM instance at compile time, ensuring zero runtime
overhead.
Tested on STM32U5A5 with all four LPTIM instances (LPTIM1-4).
Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
The driver internally uses semaphores which are only available if
CONFIG_MULTITHREADING is enabled in the build.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
It might happen that some boards have "zephyr,entropy" node set, but under
the hood the driver is not available (ex: entropy_bt_hci not being
available because CONFIG_BT_HOST is not enabled in the build).
This commit changes the behavior so that:
1. if "zephyr,entropy" is set in the DT then CONFIG_CSPRNG_AVAILABLE get
enabled;
2. CONFIG_CSPRNG_AVAILABLE selects CONFIG_ENTROPY_GENERATOR
3. if there really is a driver available then CONFIG_ENTROPY_HAS_DRIVER
will be enabled by that driver;
4. CONFIG_ENTROPY_HAS_DRIVER selects CONFIG_CSPRNG_ENABLED;
4. Mbed TLS can consume the CONFIG_CSPRNG_ENABLED information to
decide whethere to enable CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG or
the legacy CONFIG_MBEDTLS_PSA_CRYPTO_LEGACY_RNG.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Enable Link-Up and Link-Down interrupts. On the interrupt handling
the monitor work is scheduled to update the link status and calling
corresponding callback routine.
Signed-off-by: Tony Han <tony.han@microchip.com>
Add support for KSZ9131 (Gigabit Ethernet Transceiver with RGMII Support).
As first starter, 100MBit/s mode is tested.
https://www.microchip.com/en-us/product/ksz9131
Signed-off-by: Tony Han <tony.han@microchip.com>
Some Mbed TLS' Kconfigs were renamed in order to improve the 1:1 matching
between them and the build symbols used in Mbed TLS. This commit add a note
on the migration-guide document for this change.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This is to preserve backward compatibility until the deprecation period of
the old names expires. After that time entries from that file can be
removed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Some variants of the PCA953x family support pull-up / pull-down
resistors through registers 0x43 and 0x44 (mostly the TCAL9538 variant).
We already support input latching and interrupt masking (which is also
only present on a few variants), so let's also add support for pull-up
and pull-down resistors.
The feature can be enabled with the has-pud property in the device tree.
Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
Extend the Signing Images section in the build documentation to
highlight the differences between confirmed and unconfirmed images
with respect to the PSA Certified Firmware Update API.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Add a note about BL2 (MCUboot) signing updates when the board is built
as TF-M NS.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
When CONFIG_TFM_MCUBOOT_IMAGE_NUMBER is 1, all images are merged.
Currently, there is no tfm_merged.bin file for use in FOTA. This
adds file generation to fulfill that requirement.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
When CONFIG_TFM_MCUBOOT_IMAGE_NUMBER is 1, the process to create the
final tfm_merged.bin file is more complex. This prepares the content
to introduce the generation of tfm_merged.bin for use in FOTA
applications.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The optional --output-bin parameter instructs the IntelHex class to
save the content as a binary file instead of the Intel Hex format.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Use cmake_parse_arguments() for more idiomatic code. This makes the
code more readable and easier to extend with new options.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
A fundamental use of Trusted Firmware-M is to provide security for
IoT applications, where firmware upgrades (FOTA) are almost always
mandatory. The current file signing process does not produce the
necessary binaries for multi-image S/NS FWU, since hex images are
not suitable for this use case. This introduces the missing signed
binary files for use by the FWU partition. The changes were tested
in multi-image FWU scenarios, and support for single-image scenarios
can be easily added in the future.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Make variables that define output files explicitly include 'HEX' in the
name. This refactoring step allows for the introduction of BIN file
generation.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The current behavior when signing an image adds --pad but does not
confirm the image. This appears to be a mistake, as the user should
inspect the image status in the Firmware Upgrade software. If an image
is not --confirmed, the FSM cannot infer the correct states. This sets
the image as confirmed to resolve the issue.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The current behavior when signing an image is to always set --pad and
--pad-header for all images unless TFM_USE_NS_APP is set. This does not
allow for easy creation of signed images for FOTA applications. Rewrite
the PAD parameter as HEADER and TRAILER to simplify the setup of more
signing options.
Another important reason for this change is that the NS image, when
signed without --pad, runs on the hardware but does not perform the
MCUboot test, and the FWU never upgrades the image. This fixes the NS
image signing process to correctly support TF-M FWU using the PSA API
functions.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The --max-sectors option helps catch problems with flash overlap when
merging images. If there is a misalignment in flash partitions, the
merge process usually fails. This uses information from Zephyr flash
partitions and the flash controller to automatically determine the
max sectors value and apply it when signing an image.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The current version of TF-M script that sign MCUboot image uses a
default alignment of 1. This value varies between flash devices
and not all accept the default 1. This improve the script picking
the write-block-size property from the current flash controller
and pass as the --align parameter when signing an image.
Note: This solution works out-of-box for the vast majority of
devices in the Zephyr tree and an exception will throw when
a device is not supported.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The partitions for the stm32l562e_dk/stm32l562xx/ns board are not aligned
with TF-M. This fixes the partition alignment.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
The external partitions are defined dependent from S and NS images. This
move the external partitions from common to the S image. The NS image
will be defined in future to allow correct usage of MCUboot.
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>
Exclude mps3/corstone300/an547/ns from PSA tests because QEMU does not
model the QSPI flash in MPS3 boards as real QSPI flash, but only as
simple ROM. Attempting to rewrite the flash from the guest will fail.
https://github.com/zephyrproject-rtos/zephyr/pull/94470#issuecomment-3197729501
Signed-off-by: BUDKE Gerson Fernando <gerson.budke@leica-geosystems.com>