Commit graph

87689 commits

Author SHA1 Message Date
Andrej Butok 84955951ef boards: lpcxpresso55Sxx: Make Jlink a default runner.
Make Jlink a default runner for lpcxpresso55Sxx.
The LinkServer runner command line tool does not support .hex flashing.
This feature is planned for LinkServer v1.6 (July 2024).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-23 10:02:56 +01:00
Krzysztof Chruściński c143daf98d tests: logging: log_backend_uart: Disable backends other than UART
Test expects that there are no other backends enabled and some
may be enabled by default.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-23 10:02:45 +01:00
Francois Ramu f442c03a20 samples: subsys: nvs on nucleo_g431 requires 6kB for storage partitions
Add the overlay for running the samples/subsys/nvs/ application
on the nucleo_g31rb. Define a 6kB storage_partition at the end
of the 128kB flash.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-23 10:02:33 +01:00
Andrzej Głąbek c949018d36 tests: drivers: flash: Use fixtures for tests requiring external chips
Several scenarios in this test require specific external flash chips
to be connected to the nRF52840 DK. Specify proper fixture for them
so that they are not performed on the board without those required
external components connected.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-11-23 10:02:22 +01:00
Andrzej Głąbek 4a262c3947 tests: drivers: flash: Update nrf52840dk_mx25r_high_perf.overlay
This is a follow-up to commit 7a83724e0f.

This overlay uses an alternative connection (via spi2) for the external
flash present on the nRF52840 DK and it needs to use one of the QSPI
pins as GPIO, to get CS line control in the SPI communication. To make
it possible, that GPIO must be removed from those marked as reserved.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-11-23 10:02:22 +01:00
Bartosz Bilas e7c7c5a769 doc: zbus: add missing timeout arg for zbus_chan_add/rm_obs funcs
zbus_chan_add_obs and zbus_chan_rm_obs functions require
a timeout as their third arg.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-11-23 10:02:13 +01:00
Marcio Ribeiro 468890d70f drivers: clock_control: clock_control_esp32 assert remotion
No longer necessary assert removal

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2023-11-23 10:02:05 +01:00
Daniel Leung 40ba4015e3 kernel: mm: only include demand_paging.h if needed
This moves including of demand_paging.h out of kernel/mm.h,
so that users of demand paging APIs must include the header
explicitly. Since the main user is kernel itself, we can be
more discipline about header inclusion.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-23 10:01:45 +01:00
Daniel Leung 062fc2242a sys: arch_interface: include arch/syscall.h if USERSPACE
Due to arch_syscall_invoke are declared static, if there are
no corresponding definition, compiler will complain. It has
been working fine so far because arch/syscall.h is included
indirectly through some other headers (especially through
generated syscall stubs). However, with enough header files
shuffling this becomes an issue. So include arch/syscall.h
in arch_interface.h explicitly.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-23 10:01:45 +01:00
Flavio Ceolin b43271dc2d doc: vuln: Disclose information about CVE-2023-5055
Information about CVE-2023-5055

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-23 10:01:30 +01:00
Joakim Andersson 2ad6dda9fd tfm: Remove limitation of enabling FP when build TF-M NS application
Remove limitation of enabling FP when building TF-M NS application.
FP support have been fixed in the tf-m-tests repository for NS
application.
Board support for NS executable may still be lacking for some boards.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-11-23 10:01:22 +01:00
Joakim Andersson 1ab669e3d0 tfm: Remove SFN model FP limitation
Despite what the TF-M documentation says about SFN model not supporting
Floating Point, it does support it, according to TF-M developers.

Remove SFN limitation not supported with FP Hard ABI.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-11-23 10:01:22 +01:00
Maximilian Deubel 58175fcf18 boards: nrf9131ek and nrf9161dk: update readme to emphasize nr-plus
This patch changes readme files of nRF91x1 dev kits to highlight
their added NR+ feature.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2023-11-23 10:01:12 +01:00
Kamil Rakoczy c0eb918037 posix: sys: fix missing include to _timeval.h in native_sim
zephyr/net/socket_types.h file also includes _timeval.h, but it uses
correct path/filename depending on configuration.

Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2023-11-23 10:00:59 +01:00
Hein Wessels 82a6a69b81 tests: drivers: adc_dma: add test for nucleo_l476rg
Add test to verify the ADC + DMA functionality works
for the STM32L476 MCU.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-11-23 10:00:50 +01:00
Hein Wessels a257bcb735 drivers: adc: stm32: add dma support for other mcus
This commit adds support for more STM32 CPUs that has
a different DMA interface. This was tested only for
the nucleo_l476rg.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-11-23 10:00:50 +01:00
Hein Wessels f27e45473a drivers: adc: stm32: driver now agnostic of actual dma name
Previously the STM32 DMA driver was dependent on a very specific
name for the DMA in the DTS. This hidden requirement has caused
a bit of confusion. This commit changes the driver to instead
always use the first DMA listed in the ADC node's dma property.

Should fix: #65387

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-11-23 10:00:50 +01:00
Hein Wessels 2750e1e3b5 drivers: dma: stm32: add utilities to access properties by idx
Some drivers like the ADC access the DMA through it's index
and not the DMA name. This commit add some better support
for such instances.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-11-23 10:00:50 +01:00
Siddharth Chandrasekaran 5b24a8ad72 mgmt/osdp: Fix off-by-one in buf len checks
Initially, the command/reply ID byte was not part of the data length
macros. But later, when it was changed to include it, the buffer length
checks was not adjusted. Due to this, we were not using the last byte in
the buffer. Fix this issue by correcting the condition.

Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-11-23 09:59:52 +01:00
Siddharth Chandrasekaran 061a87aff8 mgmt/osdp: Replace __ASSERT() with an explicit if
Commit c7fec71193 ("mgmt/osdp: Add length checks for commands and
replies") attempted to remove code duplication by adding a macro to perform
a length check. At the time, a CI linter did not like macros with control
flow so the code was switched to a method which called __ASSERT() on this
condition.

The __ASSERT() macro is a nop if CONFIG_ASSERT=n (which is the default) and
causes the buffer access to be unguarded which may lead to OOB accesses.
This patch fixes the issue by reintroducing the if check.

Fixes: c7fec71193.
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
2023-11-23 09:59:52 +01:00
Andrej Butok d2bd778bcc kconfig: mcuboot: Add MCUBOOT_IMGTOOL_OVERWRITE_ONLY option
Add MCUBOOT_IMGTOOL_OVERWRITE_ONLY Kconfig option which
passes the --overwrite-only option to imgtool to avoid
adding the swap status area size when calculating overflow.
It is used by non-swap update modes.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-23 09:59:36 +01:00
Christopher Friedt 41b7c17ac4 tests: posix: pthread: check that pthread_atfork() exists
Add a simple existence check that pthread_atfork() has
some kind of implementation. The function is mandatory
by all conforming POSIX systems.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-23 00:59:32 -05:00
Christopher Friedt 1d501a76af doc: services: portability: posix: pthread_atfork() supported
Mark pthread_atfork() as supported in the documentation.

This option is a mandatory requirement (i.e. it must be present)
even when calling it produces undefined behaviour. That is the
case here, and documentation sbould be updated to reflect that.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-23 00:59:32 -05:00
Christopher Friedt a0c307c0a5 posix: pthread: implement pthread_atfork()
pthread_atfork() is required by the POSIX_THREADS_BASE
Option Group as detailed in Section E.1 of IEEE-1003.1-2017.

The POSIX_THREADS_BASE Option Group is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise
mandatory for any POSIX conforming system as per Section
A.2.1.3 of IEEE-1003-1.2017.

Since Zephyr does not yet support processes and (by extension)
fork(), this implementation includes a deviation and should be
categorized as producing undefined behaviour.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-23 00:59:32 -05:00
Christopher Friedt 3b45235887 doc: posix: structural reorganization of posix docs
Revise the structure of the POSIX API docs. This separates
related items out to dedicated pages. Further improvements
could yet be made - e.g. using the 'collapse' feature to
expand and collapse large sections of text or tables.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-22 22:47:26 -05:00
Fabio Baltieri 5efa5b2892 tests: drop input_ prefix from input tests
These are already in a "input" subdirectory, the prefix is redundant,
drop it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-22 23:22:38 +00:00
Fabio Baltieri d9fd752392 sensor: mchp_tach_xec: drop PM_DEVICE guards
These are not needed and are now causing build errors since the
pm_device calls are always there and need the header to become a no-op.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-22 21:54:45 +00:00
Marek Matej d34f725df8 soc: xtensa: esp32s3: Update SOC variant list
Add missing combinations of the ESP32-S3 Wroom module.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-11-22 21:56:39 +01:00
Jamie McCrae 46889819e6 cmake: modules: dts: Fix board revision 0 overlay
Fixes an issue whereby a board revision is 0 and the overlay file
exists but would not be included

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-22 21:55:17 +01:00
Bartosz Bilas 43d5f39209 zbus: add MULTITHREADING dependency
Zbus uses mutexes internally that are available
only when MULTITHREADING is enabled so add
it to fix the following error:

/opt/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/
12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/subsys/
zbus/libsubsys__zbus.a(zbus.c.obj): in function `k_mutex_init':
/builds/zephyr/mcuboot/zephyr/include/generated/syscalls/kernel.h:969:
undefined reference to `z_impl_k_mutex_init'

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-22 21:54:44 +01:00
Fabio Baltieri 939b90be4c drivers: drop few redundant guard around pm_policy_state_lock_*
The pm_policy_state_lock_put and pm_policy_state_lock_put functions
already become a no-op if CONFIG_PM is not enabled. Drop the guards
around it in few different drivers.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-22 18:34:36 +00:00
Jamie McCrae 2a6cec0687 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  47b34362552835621bc289d53d2127691088cb7c

Brings following Zephyr relevant fixes:
 - 47b34362 zephyr: kconfig: Prevent MBEDTLS selection when
   tinycrypt is used
 - cd82f8bf boot: zephyr: add support for lpcxpresso55s28

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-22 17:32:33 +01:00
Jamie McCrae 67696b7311 sysbuild: mcuboot: Disable signing key in no signing mode
Prevents allowing the user to enter a signing key when the signing
mode is set to hash check only without signatures

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-22 17:32:33 +01:00
Jamie McCrae bd6d43d4c8 sysbuild: bootloader: Fix setting application Kconfig in MCUboot
Fixes wrongly setting configuration to generate an unsigned image
in the MCUboot configuration when this does not apply to MCUboot

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-22 17:32:33 +01:00
Anisetti Avinash Krishna 6de5a1a5d5 tests: drivers: uart: uart_async_api: Enabled tests for rpl_s platform
Enabled tests for intel_rpl_s_crb platform.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-11-22 17:31:08 +01:00
Anisetti Avinash Krishna 7b412be883 dts: x86: intel: raptor_lake: Added LPSS dma node for UART
Added LPSS dma node for UART Async API support

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-11-22 17:31:08 +01:00
Anisetti Avinash Krishna 05fd5b0426 boards: x86: intel_rpl: Added modifications for Asycn NS16550
Added modifications to support async apis for ns16550
on RPL-s using LPSS DMA.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-11-22 17:31:08 +01:00
Anisetti Avinash Krishna f66930fd3e drivers: uart: uart_ns16550: Enable Async operations using DMA
Enabled Async API feature for ns16550 driver using DMA support.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-11-22 17:31:08 +01:00
Huifeng Zhang 716de6fef2 MAINTAINERS: Add myself to ARM arch as collaborator
Adding myself as a collaborator on ARM arch so that I can help maintain
the aarch32 cortex-a/r codes.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-11-22 14:58:12 +00:00
Ian Morris 18c4574786 drivers: clock_control: clock_control_ra.c: main oscillator select fix
Due to a typo it is not possible to select the main oscillator (MOSC) as a
clock source for an RA Microcontroller. This patch resolves the issue.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2023-11-22 14:57:23 +00:00
Rander Wang efc3208189 soc: intel_adsp: cavs: mask idc interrupt before halting cpu
Secondary dsp is idle and waiting for interrupt before it is totally
halted. The other active cores can trigger idc interrupt to this core,
this can wake it up and result to fw panic. Mask idc interrupt as timer
interrupt to prevent this case.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2023-11-22 14:57:07 +00:00
Peter van der Perk 5edb7cbe41 soc: arm: nxp_imx: rt11xx: add support for CONFIG_ETH_MCUX_RMII_EXT_CLK
ENET_REF_CLK as an input during rt11xx clock initialization.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2023-11-22 14:56:38 +00:00
Najumon B.A c0d61d0bbd board: x86: remove parent init level dependency config
remove parent init level config from Intel Alder Lake platform

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-11-22 14:56:18 +00:00
Najumon B.A 608cc4d1f2 drivers: ns16550: remove parent init level dependency
remove parent init level dependency such as PRE_KERNEL or
POST_KERNEL. Uart driver init level change always to PRE_KERNEL

Signed-off-by: Najumon B.A <najumon.ba@intel.com>
2023-11-22 14:56:18 +00:00
Aleksander Wasaznik 589f3ad904 Bluetooth: testlib: Create testlib/conn.h
This header file declares the functions that rely on `bluetooth/conn.h`.

This collects `testlib/connect.h`, `conn_ref.h` and `conn_wait.h` into one.

Initial documentation for the functions in this file is also added.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-11-22 14:55:43 +00:00
Aleksander Wasaznik 4e976e0d58 sys: atomic: Fix includes, create atomic_types.h
This patch fixes the include of `atomic_builtin.h` and `atomic_arch.h`
so that they are IWYU. This mean they compile correctly independent of
other includes at the include-site. It was nessessary to move the
definition of the atomic types out of `atomic.h` to avoid unsatifiable
circular dependencies between `atomic.h` and `atomic_builtin.h`, as well
as definition conflicts between `atomic_arch.h` and `atomic_builtin.h`.
The definition of the type was to moved to a new file `atomic_types.h`.

The include in `atomic.h` has a IWYU pragma which will preserve
backwards compatibility with code expecting the types to be defined in
`atomic.h` if we start linting for IWYU.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-11-22 14:55:43 +00:00
Jerzy Kasenberg 46bbe052d3 drivers: regulator: add LDO/DCDC support for Smartbond.
This add regulator driver for Smartbond DA1469X SOC.
Driver can control VDD, V14, V18, V18P, V30 rails,
full voltage range supported by SOC is covered.
For VDD, V14, V18, V18P DCDC can be configured.

Special VDD_CLAMP (always on) and VDD_SLEPP are added
to allow configuration of VDD in sleep modes.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2023-11-22 14:55:16 +00:00
Kamil Piszczek 1ab08634f2 settings: nvs: improve the name ID metadata handling on delete operation
Improved the updates to the name ID metadata (NVS_NAMECNT_ID) item
in the Settings NVS backend implementation. The improvements should
make the implementation more robust in handling edge cases such as:
power downs, resets or a case in which the storage partition is
full. In the last case, the NVS backend could return an ENOSPC error
in the context of the settings_delete API. This change also fixes
this issue.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2023-11-22 14:54:53 +00:00
Fabio Baltieri ea887af0aa input: gpio_kbd_matrix: drop redundant gpio_kbd_matrix_set_detect_mode
This is called already as soon as the polling thread starts, so the call
in the gpio init function is harmless but redundant, drop it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-22 11:44:48 +00:00
Fabio Baltieri 6cd72493ff input: gpio_kbd_matrix: add direct access support
When the matrix is connected to consecutive pins on the same port, it's
possible to read the whole row or set the whole column in a single
operation. For the column, this is only possible if the matrix is
configured for driving unselected column, as there's no API to configure
multiple pins at the same time at the moment.

This is more efficient than checking the pins individually, and it's
particularly useful if the row or columns are driven from a GPIO port
expander.

Add some code to detect the condition and enable it automatically as
long as the hw configuration supports it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-22 10:34:40 +00:00