Commit graph

136,983 commits

Author SHA1 Message Date
Ederson de Souza
d6071319b5 kernel/userspace: Dynamically allocate privileged stack after user stack
When ARM CONFIG_BUILTIN_STACK_GUARD=y, it expects that the privileged
stack has a higher memory address than that of the normal user stack.
However, dynamically allocated stacks had the other way round:
privileged stack had a lower memory address.

This was probably not caught before because relevant tests, such as
`kernel.threads.dynamic_thread.stack.pool.alloc.user` run with no
hardware stack protection. If one were to test it on HW that has stack
protection, such as frdm_mcxn947 with CONFIG_HW_STACK_PROTECTION=y, they
would see it failing.

This patch naively assumes that ARC and RISC-V PMP will be happy with
the shuffling of user and privileged stack positions.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-11-13 23:20:45 +02:00
Ederson de Souza
1a52071392 samples/subsys/llext/edk: Add libc partition to extension memory domain
On platforms where `Z_LIBC_PARTITION_EXISTS` is true - such as Cortex-M
- it is necessary to add this partition to the memory domains of
userspace extensions, otherwise they get memory faults.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-11-13 23:20:34 +02:00
Ederson de Souza
5755081bb3 samples/subsys/llext/edk: Remove astray debug printk
It somehow got upstream...

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-11-13 23:20:34 +02:00
Raffael Rostagno
75395b86dc drivers: shdc: esp32: Remove unnecessary timeout
Remove unnecessary timeout. Queue event fetch already has
timeout control.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:20:08 +02:00
Raffael Rostagno
97fb97b047 drivers: sdhc: esp32: Remove pinctrl as required
Adjust driver so that pinctrl property is not required in device
tree. Remove card init functions from driver init, as set_io()
function is meant to power cycle the card (if pin is used) and
initialize card clock and bit width. If card is not inserted
while driver init runs, init() will fail unreasonably, so
card init should take place at set_io() calls.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:20:08 +02:00
Raffael Rostagno
12862fdd6c bindings: sdhc: esp32: Remove pinctrl as required
For ESP32 devices, not all boards are required to configure pinctrl
for signals like Chip Detect (CD) and Write Protect (WP). Remove
pinctrl property as mandatory.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-11-13 23:20:08 +02:00
Declan Snyder
b5de9fe252 tests: spi_loopback: Skip tests properly
There is a couple test cases which for whatever reason does not work on
certain platform drivers, and they are being hardcoded to be skipped in
the test if using those drivers. This decision was made a long time ago,
and I do not have great insight into why, but regardless, the proper way
to skip a ztest case is to call the proper ztest skip API instead of
just returning, because it should be marked as skipped, not passed.
Also, the problem for these couple drivers is clearly the cases where rx
is bigger than tx, so add the same skip for the other new case where rx
is bigger than tx, the same_buf_cmd case.

After analyzing the DSPI driver a bit, I have a suspicion that this is
just a software driver limitation, that could be overcome to function
properly, and not a hardware limitation. But this commit is just to skip
the test properly that is already being skipped, not fix the underlying
issues with these drivers.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-11-13 23:19:54 +02:00
Cristian Bulacu
5b8b5df90e openthread: platform: udp: init udp fds before external net connection
When OpenThread iface is brought up `ot ifconfig up` there are several
modules that will attempt to open a platform socket and perform bind
and bind to netif operation.
Since now, `sockfd_upd` structure was initialized after the backbone
interface announced connectivity, but this implies that OpenThread
interface will always be brought up only after this event, which is not
true, or imposed.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2025-11-13 23:19:38 +02:00
Appana Durga Kedareswara rao
639739169e twister: handlers: pass platinfo to serialPTY reorder pre-script execution
This commit makes two key improvements to the DeviceHandler:

1. Pass TWISTER_PLATFORM environment variable to serial PTY scripts
   - Enables serial PTY scripts to access platform-specific configuration
   - The platform name is now available via TWISTER_PLATFORM env variable
   - Allows board-specific serial port and baudrate configuration in
     external serial forwarding scripts

2. Reorder pre-script execution before serial PTY initialization
   - Moved pre-script execution before serial PTY setup to avoid conflicts
   - Prevents race conditions when pre-script performs board power cycling
     or reset operations that might interfere with active serial
     connections

These changes enable more flexible hardware testing scenarios where:
- Serial configuration can be automatically selected based on board type
- Board initialization (power cycling, FPGA programming) completes
  before establishing serial connections

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
2025-11-13 23:19:28 +02:00
Jordan Yates
9251f9d814 doc: llext: document symbol groups
Add documentation for LLEXT symbol groups and the default groups created
by Zephyr.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:19:19 +02:00
Jordan Yates
07a791448a llext: add helper symbol for default groups
Add a symbol that controls whether the default set of LLEXT groups are
exported from the application.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:19:19 +02:00
Jordan Yates
6582969aa9 device: transition device exports to group symbols
Transition the Zephyr device exports to the new group symbol
abstraction.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:19:19 +02:00
Jordan Yates
17611885b2 llext: optional libc symbol exports
Make the export of standard library symbols optional.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:19:19 +02:00
Jordan Yates
5e5ac8e078 llext: optional syscall symbol exports
Make the export of syscall symbols optional.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:19:19 +02:00
Jordan Yates
47656f1a75 llext: symbol: custom groups
Allow symbols to be placed in custom groups, which can be included or
excluded from the build with a common Kconfig symbol.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:19:19 +02:00
Jordan Yates
5561d8d302 llext: symbol: group exported symbols
Group exported symbols together by subsystem/library. Groups can then
be enabled or disabled together through the existance of a Kconfig
symbol named `CONFIG_LLEXT_EXPORT_SYMBOL_GROUP_{GROUP_NAME}`.

All symbols declared with the standard `EXPORT_SYMBOL` and
`EXPORT_SYMBOL_NAMED` macros fall into the `DEFAULT` group.

Signed-off-by: Jordan Yates <jordan@embeint.com>

DEFAULT

DEFAULT
2025-11-13 23:19:19 +02:00
Pieter De Gendt
e9efa7260e include: zephyr: drivers: spi: Add SPI_DT_INST_IODEV_DEFINE
Add helper macro for SPI_DT_IODEV_DEFINE with an instance variant.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-11-13 23:19:06 +02:00
Pieter De Gendt
6c3048dfa6 include: zephyr: drivers: i3c: Add I3C_DT_INST_IODEV_DEFINE
Add helper macro for I3C_DT_IODEV_DEFINE with an instance variant.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-11-13 23:19:06 +02:00
Pieter De Gendt
5cbc79f43c include: zephyr: drivers: i2c: Add I2C_DT_INST_IODEV_DEFINE
Add helper macro for I2C_DT_IODEV_DEFINE with an instance variant.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-11-13 23:19:06 +02:00
Jeppe Odgaard
ab22130b6a sys: util: remove extra call in WAIT_FOR
WAIT_FOR calls `expr` after it has evaluated to true.

Store `expr` in a variable and return it instead to prevent the additional
`expr` call.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-11-13 23:18:54 +02:00
Jeppe Odgaard
ba72ff027c tests: sys_util: test wait_for number of expr calls
Test WAIT_FOR calls `expr` the expected number of times.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2025-11-13 23:18:54 +02:00
Sudan Landge
3cd92d2003 tests: fix test failure for smp targets
The test is expected to run on single cpu so set max number of cpus to 1
so that it doesn't fail smp targets like fvp_baser_aemv8r in ci.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-11-13 23:18:30 +02:00
Mathieu Choplain
947749abfc linker: llext: move #ifdef CONFIG_LLEXT guard inside common file
LLEXT-related sections should only be added to the linker script when the
associated CONFIG_LLEXT is enabled. This has been done by checking for this
Kconfig symbol in every linker file, but this creates a lot of boilerplate
for no good reason.

Use the much simpler solution: move the check inside the common linker file
and remove existing "#ifdef CONFIG_LLEXT" checks in all linker files.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-11-13 23:17:37 +02:00
Mathieu Choplain
bfc69ad935 soc: st: stm32l4: always unlock IRQs in pm_state_exit_post_ops
Interrupts would only be unlocked when resuming from suspend-to-idle.
Even though other states *should* never be entered, make sure interrupts
are unlocked anyways to conform with the expectations of the PM framework.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-11-13 23:17:27 +02:00
Ibrahim Abdalkader
93ecfe492f boards: arduino: portenta_h7: Add JLink runner.
Adds JLink runner configuration for both Cortex-M7 and Cortex-M4 cores
on the Arduino Portenta H7.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-11-13 23:17:19 +02:00
Seppo Takalo
c309869305 net: l2: ppp: Allow PPP to transtition ESTABLISH->DEAD
When remote peer have closed the PPP link normally, the
PPP stack on Zephyr side switches back to ESTABLISH phase
to be ready for next handshake.

When calling net_if_down() on the interface, it should not
try to initiate LCP link termination, but instead go directly
to DEAD phase.

See https://datatracker.ietf.org/doc/html/rfc1661#section-3.2

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-11-13 23:17:10 +02:00
Tim Lin
60f82e6456 it8xxx2: add support for putting switch.S in ram code section
Get better performance from executing z_riscv_switch() function.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-11-13 23:17:00 +02:00
Fabio Baltieri
00966b857e input: keymap: add a MATRIX_CODE macro
Add a MATRIX_CODE macro to extract the key code from a key value created
in DT with MATRIX_KEY. This can be handy for code other than input_keymap.c

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-11-13 23:16:52 +02:00
Tim Lin
6a340f6ef0 drivers/espi: it8xxx2: Add a config to share h2ram pool space
The h2ram is an independent 4KB section. With default settings of
CONFIG_ESPI_PERIPHERAL_HOST_CMD_PARAM_PORT_NUM and
CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION_PORT_NUM,
There is a 2KB gap that is unused. This change was made to make
unused gap can be reused by other modules to reduce overall RAM
usage.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-11-13 23:16:43 +02:00
Qiankun Li
3b2b513be3 drivers: wifi: nxp: Raise Wi-Fi mgmt events for soft AP start/stop.
Enhanced the shim driver to raise Wi-Fi management events
when starting or stopping SoftAP, specifically in cases
where CONFIG_WIFI_NM_HOSTAPD_AP is disabled.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-11-13 23:16:25 +02:00
Jamie McCrae
2b52c91c06 cmake: modules: version: Check that required fields are present
Will throw an error showing what the issue with the VERSION file
is if a required field is missing

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-11-13 23:16:02 +02:00
Torsten Rasmussen
f26d245914 sysbuild: exclude APPLICATION_SOURCE_DIR from sysbuild image cache file
APPLICATION_SOURCE_DIR is image specific and the value inside sysbuild
points to sysbuild itself.

This gives wrong results when a sample uses
`zephyr_get(APPLICATION_SOURCE_DIR)` as it will fetch the sysbuild value
and not its own value.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2025-11-13 23:15:45 +02:00
Alexander Svensen
c4ab06b9c4 tests: bluetooth: tester: Add ASE ID when configuring codec
- We want to add the ASE ID to a stream as early as possible
  to make sure the events coming from BTTester to Auto-PTS
  contains the correct information.
- Previously the events that came before stream_configured
  would contain ASE ID 0, regardless of actual value.

Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
2025-11-13 23:15:36 +02:00
Carles Cufi
0d18b50009 include: sys: atomic: Check for ATOMIC_OPERATIONS_BUILTIN
The code today relied on ATOMIC_OPERATIONS_BUILTIN being the default
option if the other alternatives (_C and _ARCH) were not enabled.
Instead, explicitly check for it to avoid confusion when browsing the
code and to ensure that the user can always match a particular Kconfig
option with the #ifdeffery in the header file.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-11-13 23:15:27 +02:00
Carles Cufi
689ba58b10 atomic: Select missing ATOMIC_OPERATIONS_BUILTIN
The ATOMIC_OPERATIONS_* Kconfig option is not a choice, so it does not
have a default. However, the file that determines which actual atomic
operations backend will be used does default to
ATOMIC_OPERATIONS_BUILTIN:

3e537db71e/include/zephyr/sys/atomic.h (L26-L41)

Since we want to ensure that all SoCs intentionally select the atomic
operations backend they want to use, select it at the SoC level for all
SoCs, as well as for the Cortex-M arch when the Armv8-M baseline profile
is selected.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-11-13 23:15:27 +02:00
Alberto Escolar Piedras
07b2a098ef manifest: Update bsim to version v3.0
Main changes since v2.7
* Phy-device v2.1 API introduced
* Phy updated to use internally this v2.1 API, so channel and modem IF
  are updated accordingly

Note: Like before, bsim remains fully backwards compatible

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-13 23:15:17 +02:00
Patryk Koscik
8b20699475 west: boards: remove arch format option
HWMv2 boards do not support this field

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2025-11-13 23:14:53 +02:00
Luca Burelli
56c3fd8744 fs: ext2: (trivial) only enable logging config when ext2 is enabled
Avoid polluting every build that includes this Kconfig with EXT2
logging config unless the ext2 filesystem is actually enabled.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-11-13 23:14:44 +02:00
Szymon Janc
d53a1659ef Bluetooth: ISO: Move iso dereference after assertion
Make sure assertion is true before dereferencing chan->iso. In extreme
case compiler could skip assert check (asume it is always false) if address
was already dereferenced.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-11-13 23:14:34 +02:00
Daniel Leung
c7ec8b9353 tests: kernel/pipe_api: skip zero size test if KERNEL_COHERENCE
Zero size buffer pipes are not currently supported if memory is
not coherent between CPUs (CONFIG_KERNEL_COHERENCE=y) due to
possibility of buffers being in incoherent memory. So skip
the zero size test for now.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-11-13 23:14:20 +02:00
Albort Xue
d9196c4714 tests: pm: power_domain: add ISR safe power management test coverage
Add a new test configuration to verify power domain functionality with
ISR safe power management enabled. The test conditionally applies
PM_DEVICE_ISR_SAFE flags to test devices based on the new
CONFIG_TEST_PM_DEVICE_ISR_SAFE configuration option.

Enhance existing test assertions to verify the PD_CLAIMED flag is
properly set when devices claim power domains and cleared when they
release them, ensuring correct power domain reference counting in
both regular and ISR safe contexts.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2025-11-13 23:13:57 +02:00
Albort Xue
3781f6bf9f pm: device_runtime: fix PD_CLAIMED flag logic in ISR_SAFE context
Fix the power domain claiming condition which was inverted, causing
domains to be claimed when they were already claimed instead of when
they weren't. Add null check for power domain before accessing its
properties to prevent potential null pointer dereference. Also ensure
the PD_CLAIMED flag is properly cleared when putting the power domain.

Signed-off-by: Albort Xue <yao.xue@nxp.com>
2025-11-13 23:13:57 +02:00
Gerhard Jörges
b7d2355dbf west: completion: change skip-rebuild to no-rebuild
the west flash --skip-rebuild option was changed to --no-rebuild in
de6b5dba60

Signed-off-by: Gerhard Jörges <joerges@metratec.com>
2025-11-13 23:13:48 +02:00
Vinicius Carvalho
6efc612e8d drivers: adc: nxp: adc reference and differential channels
Fixed regression related to adc reference and adjusted to be
compatible with NXP K and MCX series.

Signed-off-by: Vinicius Carvalho <carvalho-vinicius@outlook.com>
2025-11-13 23:13:36 +02:00
Jordan Yates
71e242556d drivers: nrf_wifi: move Kconfig validation to Kconfig
Move compile time validation of Kconfig symbols into the symbols
themselves.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:12:40 +02:00
Jordan Yates
7fe7beb183 drivers: nrf_wifi: buffers from Kconfig
Remove C code overrides of RX buffer counts and sizes when the TX path
is disabled. Move the reduced resource requirements into the Kconfig
default values. Default RX buffer sizes are not changed by the commit.

Fixes #92356

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-13 23:12:40 +02:00
Valerio Setti
032339e5fa random: add description for CONFIG_CSPRNG_ENABLED
Add a short description for CONFIG_CSPRNG_ENABLED to explain its purpose.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-11-13 23:12:29 +02:00
Valerio Setti
263d7c1dbc modules: mbedtls: use CONFIG_CSPRNG_NEEDED to simplify CSPRNG enablement
Use the newly created CONFIG_CSPRNG_NEEDED to simplify the enablement of
CSPRNG for the PSA Crypto Core.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-11-13 23:12:29 +02:00
Valerio Setti
ce4319a2fe random: introduce CONFIG_CSPRNG_NEEDED
Its goal is to use it as the "connection point" between what the hardware
support and what the application needs. All the application/module/subsys
need to do is to set this new Kconfig and then check the "return" value
on CONFIG_CSPRNG_ENABLED: if the latter is set then the entropy driver was
enabled; if not something is preventing the driver from being used.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-11-13 23:12:29 +02:00
Valerio Setti
2cb58f2332 random: improve description of CONFIG_ENTROPY_NODE_ENABLED
Replace the current description with a new one which better clarifies the
scope of this Kconfig.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-11-13 23:12:29 +02:00