Commit Graph

97181 Commits

Author SHA1 Message Date
Fabio Baltieri 328365989f kernel: mem_slab: only define slab_ptr_is_good with assert enabled
Add a __ASSERT_ON guard around slab_ptr_is_good, as that is only used in
assertions and leaving it on seems to generate a build warning with some
clang versions:

kernel/mem_slab.c:207:20: error: unused function 'slab_ptr_is_good'
  207 | static inline bool slab_ptr_is_good(struct k_mem_slab *slab,...
      |                    ^~~~~~~~~~~~~~~~

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-06-10 17:46:10 +01:00
Tomasz Chyrowicz f15a2e8ca8 scripts: nrf_common: Handle SUIT artifacts
Handle MPI and root manifest for radio core separately from the main
build system logic.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2024-06-10 17:03:14 +03:00
Ali Hozhabri d500a3f35c samples: boards: stm32: Add a sample to support ST BlueNRG GUI app
Introduce a sample for BlueNRG-based devices to support interaction with
ST BlueNRG GUI application based on U(S)ART protocol.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-10 07:03:05 -07:00
Ali Hozhabri 569183bbad drivers: bluetooth: hci: Add BlueNRG reset API to ST HCI SPI BT driver
Add API to perform hardware reset optionally entering firmware updater
mode.

Remove redundant declaration for bt_spi_send_aci_config; otherwise, we will
have compiler warning if CONFIG_BT_BLUENRG_ACI is not set.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-10 07:03:05 -07:00
Ali Hozhabri d99c4bdc46 include: drivers: bluetooth: Introduce BlueNRG reset API
Introduce BlueNRG reset API for ST HCI SPI BT driver.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-06-10 07:03:05 -07:00
Arunmani Alagarsamy d12044dec5 boards: silabs: efr32_radio: Add USART pinctrl configuration node
this commit introduces a usart pinctrl node to enable the spi functionality
in the efr32_radio board. the location* properties have been deprecated
so pinctrl support has been added in the device tree included file.

Before this commit (using deprecated location properties):
- usart@40010400 (DISABLED)

After this commit (using pinctrl properties):
- usart@40010400 (READY)

Signed-off-by: Arunmani Alagarsamy <arunmani.a@capgemini.com>
2024-06-10 07:02:52 -07:00
Adrien MARTIN 6cecdb1e14 boards: silabs: efr32xg24_dk2601: fix flash partitions labels mismatch
This commit fix the mismatch between flash partition labels and node
roles on the efr32xg24_dk2601 board.

Signed-off-by: Adrien MARTIN <adrienmar@kickmaker.net>
2024-06-10 07:02:32 -07:00
Marcio Ribeiro 86ff968718 tests: drivers: adc
adds test case for esp32 adc with dma enabled

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-06-10 07:02:19 -07:00
Marcio Ribeiro 19d8ade5fa drivers: adc: esp32: dma enable
adc dma mode operation on ESP32S3 and ESP32C3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-06-10 07:02:19 -07:00
Yassine El Aissaoui bb770c5965 samples: tests: bluetooth: Add support for frdm_rw612
Adding bt_tester support.

Adding bt_tester app build
with Twister for frdm_rw612 board

Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.

Twister builds added on peripheral/central ht and
enabled Power manager on those examples to cover
the CI builds with PM enabled.

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-10 07:02:06 -07:00
Yassine El Aissaoui c7c1e453ad boards: frdm_rw612: Update for BLE enablement
- Update Doc with BLE info
- Configure board for BLE
- Add pinctrl for flexcomm0 in usart mode
needed for BLE tester application

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-06-10 07:02:06 -07:00
Marek Matej 9f1a4e3e4f soc: espressif: esp32s3: add cross segment call check
Add build check that would detect unwanted calls
from the `iram0.loader_text`, which is the last
bootloader segment to be alive.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-10 16:58:28 +03:00
Marek Matej 61bb79c7ea soc: espressif: esp32s3: fix memory utilization
Fixed bootloader memory layout.
Improved memory utilization.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-10 16:58:28 +03:00
Benjamin Cabé 1f058383ae doc: security: improve ETSI 303645 table layout
Improve ETSI 303645 layout both for HTML (use more appropriate column
widths) and PDF (use landscape orientation).

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 16:58:10 +03:00
Jakub Zymelka 502fcac821 arch: riscv: core: Enable RISCV IRQs for no multithreading
Enable MSTATUS.IEN to allow RISCV interrupts for
non-multithreaded applications.

Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
2024-06-10 16:57:44 +03:00
Andrej Butok 0da71234e6 boards: nxp: kinetis: fix non-optimal sector distribution
- Optimize slot sizes for MCUBoot swap move algorithm
  for frdm_k22f/k64f/k82f, twr_ke18f/kv58f220m,
  hexiwear_mk64f12 and rddrone_fmuk66 boards.
- Use DT_SIZE_K/M macros for slot sizes.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-06-10 16:57:25 +03:00
Guennadi Liakhovetski 78d9abdab4 llext: disable EXPORT_SYMBOL() when CONFIG_LLEXT=n
EXPORT_SYMBOL() isn't needed when CONFIG_LLEXT is deselected, it only
needlessly creates objects, that make the resulting image larger.
Make it a NOP when CONFIG_LLEXT=n.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-06-10 16:57:09 +03:00
Celina Sophie Kalus a5c67391bb soc: stm32h7: m4: Always enable hardware semaphore clock
When BCM4 bit is set to zero, the hardware semaphore clock is never
enabled on startup. The hardware semaphores might still randomly work,
but very unreliably, and the locking procedure will need several retries
despite no competition on the hardware semaphores. This leads to wasted
clock cycles on the M4 and sometimes even random kernel panics.

This can be solved by always enabling the hardware semaphore clock in
the init procedure of the M4, regardless of whether it is used within
the initialization or not. On the M7, it is already always enabled.

Signed-off-by: Celina Sophie Kalus <hello@celinakalus.de>
2024-06-10 16:56:59 +03:00
Daniel Nejezchleb d6ed91795d net: tcp: Fix context leak during connect
Replaced tcp_out() with tcp_out_ext() when sending
SYN during tcp connect, so we can intercept error value,
beacuse in such case the packet would not be sent at all
and the stack would not trigger any mechanism to flush
this context so it ends up leaking. These scenarios can
arise when the underlaying interface is not properly
configured or is disconnected. The conn is marked to be
closed and is closed before exiting tcp_in().
Since we can now identify this case we can also exit
early in the net_tcp_connect() function and not wait
for any timeout.

Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
2024-06-10 16:56:39 +03:00
Benjamin Cabé c9a4386a92 doc: logging: fix LOG_INST_HEXDUMP_DBG link
fixed misspelled mention to LOG_INST_HEXDUMP_DBG

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 16:56:25 +03:00
Valerio Setti f8ce4a8f00 doc: describe changes from PR 71827 and PR 72243
This commit updates migration-guide and release-notes docs with
the changes introduces by PR 71827 and PR 72243.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-10 15:01:06 +03:00
François Baldassari e94af5b153 Litex: clock: Undefined behavior due to unchecked return code
Found via static analysis. Two separate error paths where failing to
check the return code leads to undefined behavior:
1. In `litex_clk_get_phase`, the divider stays set to 0 when
   `litex_clk_get_clkout_divider` errors out, which leads to a division
by 0.
2. In `litex_clk_calc_duty_normal`, the `duty` struct is used
   uninitialized if `litex_clk_get_duty_cycle` errors out.

In both case, checking the return code and returning early resolves the
issue.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-06-10 15:00:33 +03:00
Piotr Koziar 9037a708ee drivers: ieee802154_nrf5: Use BLE.ADDR instead of FICR to create EUI64.
Use BLE.ADDR to create unique (to some extent) EUI64
on nRF54H20 in some cases inside the IEEE 802.15.4 driver.

The amount of EUI64-s available in such a way is very limited
(~16 million).
However, currently there does not seem to be another feasible way to
get device identifiers on nRF54H20 (such are kept in SICR, to which the
radio core has no access).

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar 17a3c6dc24 modules: hal_nordic: turn off temperature update by default for nRF54H20.
Adds an appropriate condition to the Kconfig as
the temperature driver is not supported for nRF54H20 devices yet.

Without this change, a build with NRF 802.15.4 libraries produces
Kconfig error.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar e66b382639 ipc: fix return code of icbmsg backend send operation.
This commit fixes the issue where a serialization
error was reported after properly sending a data with 'icbmsg' backend.

The icbmsg send function's return code is set to
the sent data's len as in other backends.
The related docs were fixed and updated.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar 89c4afa3b8 modules: hal_nordic: implement hfclk start/stop for nRF54H20.
Clock_control is currently not supported on nRF54H20.
This commit adds new way of handling the hfclk targeted for nRF54H20.

This solution shall be replaced once the clock_control is supported
for nRF54H20.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Piotr Koziar cd5d5a64f5 dts: nrf54h20: add grtc channel 15 to the pool.
Adds channel 15 to the pool of grtc channels available
for allocation (i.e. with 'z_nrf_grtc_timer_chan_alloc')
on nRF54H20.

The change is motivated by lack of available channels
for the nrf_802154_timestamper when building for nRF54H20.

Signed-off-by: Piotr Koziar <piotr.koziar@nordicsemi.no>
2024-06-10 15:00:01 +03:00
Georgij Cernysiov 6be31f5243 drivers: flash: stm32: move memmap config
Move STM32_MEMMAP outside of SOC_FLASH_STM32.

That allows memory-mapped application to
be built without internal flash controller.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2024-06-10 14:58:52 +03:00
Ioannis Karachalios c8b2f2e2b6 drivers: dma: smartbond: Add missing direction case
This commit should deal with adding a missing
direction case  as memory-to-peripheral
and peripheral-to-memory transfers
should be considered the same.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-10 14:58:38 +03:00
Ioannis Karachalios c61ccd9af0 dts: renesas: smartbond: Add missing #dma-cells binding
This commit should address the #73803 issue
where the DMA node does not provide support
for the #dma-cells binding. Peripherals should
specify one or more DMA channels via the dmas
and optionally dma-names DT properties.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-06-10 14:58:38 +03:00
Benjamin Cabé 9ee3bf221d doc: pdf: add ImageMagick converter extension
Our documentation uses image formats such as WebP that are not supported
by LaTeX. This commit enables Sphinx's sphinx.ext.imageconverter
extension, and updates the documentation to indicate ImageMagick is
required to build docs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-10 14:58:16 +03:00
Johan Hedberg b46fb464cb MAINTAINERS: Add a maintainer and collaborators to hal_silabs
Update the status to maintained, add a maintainer and collaborators, and
also update the label to match the recent spelling change ("SiLabs" ->
"Silabs").

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-10 02:00:33 -07:00
Johan Hedberg 9ba4aab76e MAINTAINERS: Add a maintainer and collaborator for Silabs Platforms
Add Johan, Jérôme and Aksel to Silabs Platforms. Also update the subsystem
and GitHub label name from "SiLabs" to "Silabs", since this is the more
usual spelling.

Signed-off-by: Aksel Mellbye <aksel.mellbye@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-10 02:00:33 -07:00
Eve Redero 65154e644b doc: cmake: fix cmake config documentation
In new hardware model, the arch subfolder is no more: updating cmake config
documentation to reflect this change

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-06-10 00:59:50 -07:00
Georges Oates_Larsen 7fa6b53ac3 net: shell: Add IPv4 and IPv6 connectivity events
Add descriptions for recently introduced IPv4 and IPv6
connectivity events to the net event monitor.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen 976e0a49e4 test: net: conn_mgr: Add IPv4/IPv6 notif test coverage
Modify the test cycle routines to verify recently added IPv4- and
IPv6-specific events.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen 85c4cb9265 net: conn_mgr: Add IPv4 and IPv6 tracking
conn_mgr now fires:

- NET_EVENT_L4_IPV4_CONNECTED
- NET_EVENT_L4_IPV4_DISCONNECTED
- NET_EVENT_L4_IPV6_CONNECTED
- NET_EVENT_L4_IPV6_DISCONNECTED

These events track whether there are any ready ifaces offering
specifically IPv4 or specifically IPv6 connectivity.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen 32ae816d0b net: conn_mgr: Simplify blame handling
Don't track up/down blame separately.
Instead, track a single last-blame iface.

Don't track blame iface inside set_ready.
Instead, track directly inside handle_update.

These two changes will simplify the addition
of blame for IPv4- and IPv6-specific events.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Georges Oates_Larsen 875755fbb2 net: conn_mgr: Track ready count ephemerally
Instead of incrementing and decrementing global counter,
just recompute the ready-count from scratch every time
conn_mgr_mon_handle_update is called.

This will simplify the introduction of additional ready count types.

This should have no externally observable impact on the behavior of
conn_mgr.

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2024-06-10 00:59:34 -07:00
Robert Lubos 3501d6e6d4 net: shell: ipv4: Add information about ACD
Print information in IPv4 shell whether address conflict detection is
enabled or not.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos f3d6324bca tests: net: all: Enable IPv4 ACD in the test suite
Make sure ACD is enabled in the build-all configuration.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos c0161c8052 net: l2: ethernet: arp: Simplify ACD case
In case of ACD Probe/Announcement, all we need is to generate ARP
packet, we don't really want any cache entries to be created or searched
for. There was a bug, that a cache entry was created for the
Announcement sent, resulting in skipped ARP packet generation and
malformed packet being sent by the ACD module.

Therefore, simplify all this, by simply returning early in case of
conflict detection packets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos cc53826cc9 net: ipv4: autoconf: Integrate with the ACD module
The autoconf module can now reuse generic address conflict detection,
which was added for all address types.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos 80339ac4ee net: dhcpv4: Add support for conflict detection
In case a conflict was detected on a DHCP-assigned address, send a
Decline message to the server and start over.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos 7352aaa841 net: config: Add support for IPv4 ACD
In case IPv4 conflict detection is enabled, monitor network events to
determine whether IPv4 address is ready to use or not, so that the
library returns only after the network setup is fully complete.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos c281db0f7e net: conn_mgr: Add support for ACD events
Connection manager needs to monitor ACD events as well to determine
whether a preferred IPv4 address is available.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos a89dd1a6f6 net: shell: Add ACD events to the event monitor
Include new ACD events in the shell event monitor.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Robert Lubos 0a95423421 net: ipv4: Implement IPv4 address conflict detection
Add support for IPv4 conflict detection, as specified in RFC 5227.
The new feature is optional and disabled by default.

Address conflict detection was implemented as a part of the IPv4
autoconf feature can be generalized to be available for all address
types.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Krzysztof Sychla 87946a8996 kernel: banner: fix disabling boot banner
When the CONFIG_BOOT_BANNER flag is set to "n", but CONFIG_BOOT_DELAY
is enabled, there is a delay message printed at boot time.
This allows for the whole boot banner to be disabled.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
2024-06-10 00:59:10 -07:00
Rodrigo Peixoto 453ab8a9a3 zbus: vded: msg_sub: Improve channel ref copy
The VDED was adding the channel information per clone. But it could be
done in the original buffer. This commit fixes that by adding the
channel information to the original buffer and not for each clone. As a
result, we have a more straightforward VDED execution with fewer copies.

Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
2024-06-09 09:07:21 -05:00