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>
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>
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>
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>
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>
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>
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>
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>
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/69Fixes#81543.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
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>
Several of the codec helper functions used @retval incorrectly
Several functions referenced @ccid_list incorrectly
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
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>
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>
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>
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>
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>
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>
There is a mistake and the cpuapp_ram0x_region "reg" value should
start from 0x2f011000.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>