BayLibre contributions to Zephyr v4.0

The Zephyr Project recently released version 4.0 on November 16th 2024. BayLibre is proud to have contributed to this release in several areas.

Storage / ZMS

Riadh Ghaddab worked on one of the major features of the Zephyr 4.0 release: Zephyr Memory Storage (ZMS). This is a new storage system that is designed to work with all types of non-volatile storage technologies. It supports classical on-chip NOR flash as well as new technologies like RRAM and MRAM that do not require a separate erase operation at all.

Both the Non-Volatile Storage (NVS) and Zephyr Memory Storage (ZMS) subsystems of Zephyr internally feature a garbage collector that kind of “defragments” the storage space when available space becomes too low to write a new chunk of data. Such garbage collection permits the effective removal of the deleted entries and may recover some free space. However, this is a time-consuming process that is triggered automatically when required, without user control. On this topic Adrien Ricciardi introduced new APIs to give the application more granularity to control when the NVS garbage collector is triggered. This feature is really important in real-time scenarios when the application could not afford loosing the garbage collection time during critical computations. Finally he also improved the initial code for computing available free space.

Board support

Alexandre Bailon added support for the TI CC1352P7 single core Cortex M4F with sub-1 GHz and 2.4-GHz embedded radio capabilities.

LLEXT

Adam Wojasinski added support for AARCH64 in LLEXT (Linkable Loadable Extensions) subsystem. The subsystem provides possibility to extend application at runtime with linkable and loadable code. Extensions are precompiled executables in ELF and can be loaded and linked with main Zephyr binary.

Adam introduced a new filesystem based LLEXT loader that allows to load extension directly from the filesystem mounted in the device. The new loader is equipped with extra shell commands allowing user to load extension and execute functions from the extension manually using console.

Nicolas Pitre adjusted memory permissions for MMU systems so that, once the LLEXT blob is loaded and relocated, .text section of the loaded LLEXT is set as executable.

Networking

Alexandre Bailon added support to OpenThread for the newly added TI CC1352P7. This support can easily be extended to other boards of the same family.

Valerio Setti added support for TLS 1.3 in socket connections using the Mbed TLS library. This extends Zephyr connection capabilities toward a more modern and secure standard. To be noted also that the TLS 1.3 implementation in Mbed TLS is much more PSA Crypto API friendly than the TLS 1.2 one and this greatly helps in the Zephyr transition toward this new crypto API standard.

Adam Wojasinski supported fixing second overflow/underflow issue found in PTP stack.

Security

Following the Zephyr’s plan to reduce the number of crypto libraries available in code base, Valerio Setti started the deprecation process for the TinyCrypt library. The process is not completed yet and, as of 4.0 release, its usage has been removed from the JWT (JSON Web Token) and Random subsystems. The work is still in progress though and plans are to complete it by the 4.1 release.

GPIO

Stoyan Bogdanov added drivers for MAX14906 (4 channel industrial Input/Output) and MAX14916 (8 channel industrial Output) industrial GPIO expanders with advanced diagnostics capabilities as part of GPIO subsystem. Both of them are with SPI are interface and have programmable global diagnostics for whole chip and per channel.

Power management

Riadh Ghaddab changed how the kernel handles policy events by waking up the system some time before the event happens by taking into account the exit latency of the current power state.

Memory management

Nicolas Pitre implemented demand paging for ARM64 and x86 architectures. This allows to load properly tagged read-only data and functions only when requested, in order not to exhaust all available RAM. This feature was made available also for SMP configurations. He also fixed a potential deadlock loop for the LRU algorithm.

Arm64 and RISC-V architectures

Nicolas Pitre improved the arm64 linker script by minimizing the generated output binary file and removing old ARM32 remnants.

Nicolas Pitre also contributed to a fix for correctly computing the remaining stack space for all CPU’s IRQs.

Summary

Type Count
Authored 88
Signed-off-by 2