BayLibre at Supercomputing 2024

BayLibre has been a key player in the field of Open Source, particularly in embedded systems, for over a decade. Since our founding, we have actively participated in technical conferences around the world where we regularly deliver insightful technical presentations.

SC24

In January 2024, we launched a new Compiler Services business unit, further expanding our commitment to the Open Source ecosystem. This new group specializes in toolchains, particularly GCC, and is staffed by renowned technical experts. BayLibre engineers hold maintainer roles for GCC and contribute to its Fortran programming language support (gfortran), Nvidia and AMD GPU support as well as definition & implementation of the OpenMP/OpenACC programming language extensions.

TS_OpenACC

In November 2024, we attended Supercomputing 2024 (SC24) in Atlanta, Georgia, USA, a conference dedicated to bringing the High-Performance Computing (HPC) industry and academia together.

During SC24, Thomas Schwinge of BayLibre delivered two well-received presentations on the current state of GCC’s support for OpenMP & OpenACC at their respective BoFs. These talks sparked engaging discussions with industry leaders, including representatives from AMD, HPE/Cray, Intel and Nvidia, along with prominent national laboratories focused on advancing the state-of-the-art for HPC.

We are proud of BayLibre’s successful debut at SC24, which has helped to announce our entry into the world of high-performance computing. Looking ahead, we remain dedicated to promoting and advancing Open Source solutions. By tackling cutting-edge technical challenges, we aim to contribute to a better, more innovative future.

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

BayLibre contributions to U-Boot v2024.10

The latest version of U-Boot, 2024.10, was released in October 2024. To get all U-Boot 2024.10 release statistics look at the U-Boot documentation.

Mattijs Korpershoek, Julien Masson and Guillaume La Roque tried to give a lot of valuable feedback and reviews to other contributors. Mattijs also spend a lot of time maintaining and picking up patches for the code he maintains.

Android

Boot Flow and Ramdisk

Mattijs Korpershoek fixed a regression introduced by a previous fix. The regression caused the ramdisk to not be copied when using a boot image version 2. This has been resolved. Mattijs also fixed compressed image loading when CONFIG_SYS_BOOTM_LEN cannot fit the uncompressed image.

Bootloader Control Block (BCB)

Mattijs Korpershoek fixed a segfault that could occur when using an invalid block device. The segfault was caused by a printf statement that dereferenced a NULL pointer in the BCB code. Additionally, he fixed a build regression that occurred when building without the BCB command.

Android Boot Flow

Mattijs Korpershoek implemented a boot method for Android as a generic bootflow implementation for bootstd. This functionality was previously typically implemented as complex boot scripts. Having it implemented in U-Boot itself helps avoid unmaintainable scripts. He also added tests and documentation for the Android boot method.

In this release, only boot image v4 is supported but we are planning to contribute boot image v2 support as well. Note that this development collides with Google’s GBL. In the future, this may be converted to use GBL instead.

MMC

Mattijs Korpershoek fixed an issue where the environment was not loading correctly from MMC when the configured partition was not 0.

Mattijs also contributed a couple of fixes for the bootstd documentation.

Summary

Type Count
Authored 11
Reviewed-by 62
Tested-by 26

BayLibre contributions to Zephyr v3.7


The Zephyr Project recently released version 3.7 on July 27th 2024. Baylibre is proud to have contributed to this release in several areas.

Cryptography

Improvements to PSA crypto APIs

Zephyr’s long-term plan for cryptography involves moving towards PSA Crypto APIs. In this scope Valerio Setti:

  • contributed to update the Mbed TLS version used in Zephyr to 3.6 (LTS release).
  • added support for CONFIG_PSA_WANT_xxx Kconfigs which are used to explicitly enable crypto features on the Mbed TLS’s PSA core instead of automatically guessing them from legacy build symbols.
  • added support for the Mbed TLS’s software optimized version of the NIST P-256 elliptical curve.
  • replaced and/or added PSA crypto alternatives to TinyCrypt in several places on Zephyr’s code base (ex: TCP’s ISN and Bluetooth LE).

Valerio was also recognized as a collaborator for both “Mbed TLS” and “TF-M integration.”

OpenPGP Support

Adrien Ricciardi added support for the OpenPGP 24-bit CRC algorithm, enhancing data integrity.

Networking

PTP Protocol Introduction

Adam Wojasiński introduced the PTP (Precision Time Protocol) in Zephyr v3.7.0. This network protocol, implemented in the application layer, synchronizes clocks in a computer network with sub-microsecond accuracy. It is based on the IEEE 1588 standard. The implementation supports both IPv6 and IPv4 as transport protocols.

Network Packet Timestamps

Adam Wojasiński also added support for passing network packet timestamps to the BSD Sockets API using the SO_TIMESTAMPING socket option. Additionally, minor improvements were made to the network stack related to timestamping.

Non-Volatile Storage (NVS)

Adrien Ricciardi improved the reliability of the NVS by adding an optional 32-bit CRC to each data field. Previously, only filesystem metadata was protected with a CRC. This feature can be enabled through Kconfig. He also fixed issues with the nvs_calc_free_space() function and implemented stricter checks to identify and reject corrupted NVS items.

Riadh Ghaddab fixed a broken test case in the NVS test suite related to the cache after garbage collection.

DesignWare SPI Enhancements

Julien Panis added support for multiple interrupt lines for errors in the DesignWare SPI driver. This allows for individual lines for each of the four DW SPI error interrupts (TX overrun, RX underrun, RX overflow, and master error) instead of a single line for all errors.

Another contribution by Julien manages the DW SPI driver’s MMIO (Memory-Mapped I/O) region, ensuring proper operation on 64-bit platforms.

Memory Management

Nicolas Pitre refined the core demand paging code and prepared it for ARM64 support. He also implemented an LRU (Least Recently Used) eviction algorithm for demand paging.

Additionally, Nicolas fixed issues with the ARM64 MMU code and added formal test cases to ensure future stability.

Timers

Nicolas Pitre addressed several timer-related issues, including removing unnecessary runtime division, handling maximum periods correctly, and implementing optimizations and bug fixes.

RISC-V Improvements

Nicolas Pitre contributed to improvements in the RISC-V exception handling and Physical Memory Protection code.

Analog Devices Support

Axel Haslam and Philip Molloy enhanced the Analog Devices SDP-K1 evaluation board by incorporating USB CDC support. This enables the transmission of debug logs to the host computer while simultaneously streaming data from an analog-to-digital converter (ADC).

Stoyan Bogdanov introduced a definition for the SDP-120 pin connector, making it compatible with the 120-pin connector on the ADI SDP-K1 board. This simplifies the process of working with the board as pins can now be accessed using their respective names. This feature was particularly beneficial when combined with the SDP-I-PMOD and an attached devkit.

Angelo Dureghello focused on refining the ADIN2111 PHY driver, implementing several fixes and improvements. Additionally, support for the ADIN1100 device was added.

Code Cleanups

Adrien Ricciardi introduced the SIZEOF_FIELD() macro, aligning it with the Linux implementation. This macro eliminates the need for redundant code in various parts of Zephyr that previously relied on direct code manipulation to achieve the same goal. By centralizing this functionality, code consistency and maintainability are improved.

Summary of BayLibre contributions in Zephyr v3.7.0

  
Authored153
Co-developed-by1
Signed-off-by2