Commit graph

106227 commits

Author SHA1 Message Date
Jukka Rissanen
26d033b790 net: ipv6_pe: Check return value from mbedtls_md_setup
Bail out if mbedtls_md_setup() returns an error.

Fixes #81950
Coverify-CID: 434626

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 15:42:08 +00:00
Stig Bjørlykke
7d20d3a28c net: lwm2m: Make BinaryAppDataContainer instances configurable
Add Kconfig variables for BinaryAppDataContainer instance count
and data instance count.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2024-11-28 15:41:52 +00:00
Ilya Tagunov
07b4d3a297 posix: clock: partially reformat __z_clock_nanosleep
Apply clang-format to the offending lines to make it happy.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 15:41:32 +00:00
Ilya Tagunov
4c56eb6f65 posix: clock: fix potential int32_t overflow in __z_clock_nanosleep
As k_sleep returns int32_t, there is a possibility for integer overflow
during conversion from milliseconds to nanoseconds.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 15:41:32 +00:00
Ilya Tagunov
bf525851e8 posix: clock: fix 32-bit time_t overflow in __z_clock_nanosleep
Nanosecond time calculation overflows if the libc has 32-bit time_t.
One such libc is the classic ARC MWDT one, but there might be others.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 15:41:32 +00:00
Benedikt Schmidt
760210f39d drivers: fpga: separate drivers of iCE40 for SPI and GPIO bitbang
Separate the current driver for the FPGA iCE40 into two different ones.
One implements only the SPI load mode, the other one only the GPIO
bitbang mode.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-11-28 15:39:33 +00:00
Sylvio Alves
a7a978a946 drivers: bluetooth: esp32: enable entropy generator by default
As BT now uses PSA crypto API instead of TinyCrypt, entropy generator
is now needed for a proper bluetooth operation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-11-28 15:39:08 +00:00
Valerio Setti
1320b3dd66 tests: bsim: comment out some failing AC tests
This commit comments out some test AC cases that are failing in bsim.
These will be investigated in PR #82199.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Valerio Setti
2e822d5c56 Revert "samples: bt: reduce system heap memory for the hci_ipc sample"
This reverts commit 184c0f9e9d.

Reducing system heap memory to 1024 caused runtime failures on some
platforms. This commit revert that change and return to the previous
size.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Valerio Setti
3bf9a14f98 Bluetooth: Host: increase BT_LONG_WQ stack size when using ECC emulation
After the switch from TinyCrypt to PSA Crypto API as crypto
backend, runtime crashes might happen on some platform due
to BT_LONG_WQ's stack size not being large enough. This
commit fixes this issue.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Valerio Setti
5790de6d6a Bluetooth: Host: use P256-M in ECC emulation
When BT_SEND_ECC_EMULATION and the platform uses Mbed TLS as PSA
Crypto provider, we select the Cortex-M software optimized
implementation of the secp256r1 curve algorithms. This is much
faster than the standard support provided by Mbed TLS and it
also reduces ROM footprint.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-28 15:38:57 +00:00
Benjamin Cabé
2f583a8369 doc: gsg: warn against using Python 3.13 on Windows
History seems to repeat itself and we need to momentarily discourage
folks to use Python 3.13 on Windows until windows-curses releases a
PyPI package that works with it.
See https://github.com/zephyrproject-rtos/windows-curses/issues/69

Fixes #81543.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-11-28 12:53:42 +01:00
Sahaj Sarup
18a3f6f0fa board: arm: Add support for WeAct Mini STM31H7B0
This board is mostly the same as mini_stm32h743.

Noatable diffrences for dt:
- rcc config
- octospi in quadspi mode
- pinmux naming for USB and quadspi

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2024-11-28 12:53:25 +01:00
Emil Gydesen
f254280f1f Bluetooth: Audio: Fix bad docs for codec helper functions
Several of the codec helper functions used @retval incorrectly
Several functions referenced @ccid_list incorrectly

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-28 12:53:09 +01:00
Ravi Dondaputi
11dae0e9eb net: l2: wifi: Add checks for cert header creation
Execute certificate headers creation rules only if Wi-Fi Enterprise mode
is enabled.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2024-11-28 12:52:34 +01:00
Grzegorz Swiderski
c120f4fe56 modules: hal_nordic: nrfs: Enqueue requests when not connected
Allow `nrfs_backend_send` to push early requests into the message queue,
but defer sending them until a connection is established, at which point
the queue will be flushed. This benefits asynchronous code by making it
optional to call `nrfs_backend_wait_for_connection` before using the
nrfs service API, which is already non-blocking.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-11-28 12:52:16 +01:00
Ian Morris
dae37b69c5 boards: shields: added reset to mikroe ble tiny click
Added ability for host MCU to perform a hardware reset of the DA14531
contained on the Mikroe BLE Tiny Click.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-28 12:52:01 +01:00
Ian Morris
8e51ebf499 drivers: bluetooth: hci: add hardware reset for da1453x
Add ability to perform a hardware reset of the DA1453x during setup of
the HCI transport.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-28 12:52:01 +01:00
Krzysztof Chruściński
d87bafea30 dts: common: nordic: nrf54l20: Add missing nodes
Add missing nodes: i2c23, i2c24, spi23, spi24, uart23, uart24.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-11-28 12:51:45 +01:00
Piotr Kosycarz
d897c70b06 samples: boards: nordic: system_off: add console checking
Basic verification of output.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-28 12:51:32 +01:00
Yong Cong Sin
e6dd68ec89 arch: riscv: introduce CONFIG_RISCV_GP_PURPOSE choice
Introduce `CONFIG_RISCV_GP_PURPOSE` choice to make sure that only
one of `CONFIG_RISCV_GP` or `CONFIG_RISCV_CURRENT_VIA_GP` can be
enabled, instead of relying of dependencies.

To do that, introduce a new
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING` that can be selected
by SoC when it implemented global pointer (GP) initialization for
relative addressing in its linker.

`CONFIG_RISCV_GP` will be the default choice when
`CONFIG_RISCV_SOC_HAS_GP_RELATIVE_ADDRESSING=y`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-28 12:51:09 +01:00
Yong Cong Sin
033804e266 arch: riscv: support CONFIG_USERSPACE in CONFIG_RISCV_CURRENT_VIA_GP
Reset the the `gp` register to `_kernel->cpus[i].current` when
`CONFIG_USERSPACE` is enabled on exception to keep it sane.

Updated the testcase to test both `CONFIG_RISCV_GP` and
`CONFIG_RISCV_CURRENT_VIA_GP`.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-28 12:51:09 +01:00
Pavel Vasilyev
1eeee010bd bluetooth: mesh: cfg_cli: Update logs when pulling out CDP0 and 1
This commits puts in order log messages when unpacking CDP0 and CDP1 so
that it a bit more clear where the error happens.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-28 12:50:58 +01:00
Pavel Vasilyev
e2a0fafe42 bluetooth: mesh: cfg_cli: Check buf len when pulling out data
This commit checks that config client doesn't pull out data outside of
the buffer.

Fixes #80012

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-28 12:50:58 +01:00
Arkadiusz Balys
1e69738bf2 boards: nordic: Fix cpuapp_ram0x_region reg value.
There is a mistake and the cpuapp_ram0x_region "reg" value should
start from 0x2f011000.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-11-28 12:50:44 +01:00
Jukka Rissanen
c6a1af5c17 net: ethernet: bridge: Drop the cloned packet in error
We need to drop the cloned packet that was fed to the bridge instead of
returning directly from the function. Without this change we have a
buffer leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 12:50:36 +01:00
Jukka Rissanen
ed0dcca2fb net: ethernet: bridge: Avoid null pointer access
If the packet cloning failed, bail out in order to avoid
null pointer access.

Fixes #81992
Coverity-CID: 434493

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-28 12:50:36 +01:00
Ilya Tagunov
8780d912fa tests/storage/stream_flash: add nrf52840dk/nrf52840 to platform_allow
If nrf52840dk/nrf52840 is an integration platform, it should also be an
allowed platform, otherwise the test run breaks down.

Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
2024-11-28 12:07:58 +02:00
Pavel Vasilyev
2041682900 bluetooth: mesh: brg_cfg_cli: Initialize prohibited value
Coverity complains about uninitialized prohibited fields. Even though it
is not used because it is "prohibited", it is simpler to just
initialized it with the value received from a server.

Fixes #81939
Coverity-CID: 434649

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-11-28 09:43:48 +01:00
Piotr Kosycarz
5ae4f11c93 tests: drivers: enable more tests for nrf54l10 and nrf54l05
counter_basic_api, i2s_api, i2s_speed, uart_async_api

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-11-28 09:42:58 +01:00
Håkon Amundsen
8a82b078a4 boards: nrf54h20: increase size of cpuapp and cpurad partitions
This is possible due to the memory map changes introduced in
26603cefaf

Signed-off-by: Håkon Amundsen <haakon.amundsen@nordicsemi.no>
2024-11-28 09:42:46 +01:00
Dominik Ermel
71fe68cab8 tests/stream_flash: Remove CONFIG_MPU_ALLOW_FLASH_WRITE=y
The commit removes storage.stream_flash.mpu_allow_flash_write as it was
pointless, and moves nrf52840, as integration platform, to
storage.stream_flash.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-11-28 09:39:17 +01:00
Jamie McCrae
5437ded36c mgmt: mcumgr: grp: img_mgmt: Fix misplaced #endif
Fixes a misplaced endif which wrongly excluded functions

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-11-28 09:38:49 +01:00
Declan Snyder
7271000fe5 drivers: spi_mcux_lpspi: Clean up DMA path
Clean up DMA path of code.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
2c884a9274 drivers: spi_mcux_lpspi: Optimize dma callback
Optimize DMA callback by cleaning up the code and storing less debug
logging strings.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
5dbe322c9b drivers: spi_mcux_lpspi: Clean up configure func
Do all input validation etc BEFORE setting up configuration,
instead of mixing these things everywhere. Also condense the formatting
of the code.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
b7c35fb569 drivers: spi_mcux_lpspi: Remove rtio prepare_start
Remove unneeded prepare_start function since all uses of it are paired
with the start function. Also, probably should not mess with chip select
before deciding to do the transfer. And just return on some error like
the rest of the driver does instead of assert.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
d6a6b11aac drivers: spi_mcux_lpspi: ErrLog dev in iodev_start
Log the device name and status if the transfer could not start,
same way as in non-RTIO path.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
47115e3afe drivers: spi_mcux_lpspi: Macro for master cfg flag
All the master transfer seemed to use the same config flags,
reuse with a macro.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
561b4347d7 drivers: spi_mcux_lpspi: Clean up next_packet func
Next packet function is way more complicated than it needs to be. Clean
it up by simplifying the code and making readable helper functions.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
af3c25a1f8 drivers: spi_mcux_lpspi: Remove commented code
Remove lines of code that are commented out.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
fa82ec0602 drivers: spi_mcux_lpspi: Remove duplicate bufsetup
This line doesn't need to be in multiple places.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
830c0a9e3c drivers: spi_mcux_lpspi: clean up transceive calls
Move transceive funtions next to each other and clean up the wrapping of
functions to eliminate the ifdefs.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
810b563ea7 drivers: spi_mcux_lpspi: Group API functions
Group the actual API functions to be next to each other.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
595e16caf6 drivers: spi_mcux_lpspi: Consolidate IRQ handle
Small change to consolidate the amount of lines of code in
the spi_mcux_isr by making a macro for the argument and removing
a line of code that was commented out.

Also move the ISR to be the first function in the file which is
common in many other drivers, instead of randomly in the middle of the
file. And move the isr callback to be next to the isr.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
e21bf37f13 drivers: spi_mcux_lpspi: Minor RTIO cleanup
Add closing comment for #ifdef and remove unnecessary
indentation of an else block. Also move the transcieve_rtio
function to be near the other rtio functions. And move function
prototypes to top of file.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
5d081c98fb drivers: spi_mcux_lpspi: Create DMA dev helpers
Create helper functions for duplicated code related to
checking for DMA devices, with readable names.

Also remove unneeded function prototype.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
d76ccdbdea drivers: spi_mcux_lpspi: Clean up init function
Do initializations in a more logical order,
remove unnecessarily duplicated code,
reorder stack variables to be in reverse christmas tree order.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
5a0d9831b1 drivers: spi_mcux_lpspi: Move init to end of file
Move init function to bottom of file by custom.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00
Declan Snyder
0727566c4a drivers: spi_mcux_lpspi: Remove parent_dev field
Remove parent_dev from config struct, and simplify code for the
definition and use of the irq config function.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-11-27 22:54:09 -05:00