Commit graph

136,983 commits

Author SHA1 Message Date
Jérôme Pouiller
a8422253cf arch: arm: Also avoid literal pools in assembly code
In addition to -mslow-flash-data, we must also ensure that the assembler
does not generate literal pools. They are automatically generated by the
LDR pseudo-instruction[1]:
  - If the constant can be constructed with a MOV or MVN instruction, the
    assembler emits the corresponding instruction.
  - Otherwise (when the value does not fit on 16bits), the assembler places
    the value in the next literal pool.

No options was found in GNU assembler to disable literal pool generation.
Therefore, this patch explicitly uses MOVT and MOVW when the assembler
would otherwise generate literal pool. Note, that LDR must be kept under
ifdef since Cortex-M0 does not support MOVT/ MOVW.

This patch only change four occurrences of LDR. The other occurrences do
not appear to generate literal pool (likely because the literal values are
< 0xFFFF). If a literal pool is generated in the future, it will introduce
a performance penalty. No other limitations are expected.

[1]: https://developer.arm.com/documentation/dui0204/f/ \
     writing-arm-assembly-language/loading-constants-into-registers/ \
     loading-with-ldr-rd---const?lang=en

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-03-03 18:02:57 +01:00
Jérôme Pouiller
52b46b1d07 arch: arm: Allow to avoid literal pools
On some SoC, no data cache is associated with the main flash. Therefore,
all accesses to data stored in flash, especially literal pools[1] penalizes
performance. Fortunately, GCC and IAR provide options (-mslow-flash-data
and --no_literal_pool) to prevent the generation of literal pools.

Unfortunately, current GCC versions (14.x) do not support -mslow-flash-data
when Thread Local Storage (TLS) variables are used. A patch is currently
under review[2][3] to address this limitation. Without this gcc patch,
using -mslow-flash-data is not very user friendly. The user must rebuild
the libc (CONFIG_PICOLIBC_USE_MODULE=y) without TLS support
(CONFIG_THREAD_LOCAL_STORAGE=n), and must ensure that the application does
not rely on thread-safe "errno".

Because of these interactions with the compiler, this option can't be
automatically selected by the SoC. Thus, this patch leaves the option
hidden. The SoC may expose it if relevant.

[1]: https://en.wikipedia.org/wiki/Literal_pool
[2]: https://gcc.gnu.org/pipermail/gcc-patches/2026-February/707887.html
[3]: https://github.com/zephyrproject-rtos/gcc/pull/65

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-03-03 18:02:57 +01:00
Martin Stumpf
2ef7ee567e mcumgr: Fix 'stat' group error codes
Error codes of group 'stat' were incorrectly labeled as group 'zbasic'.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2026-03-03 18:00:54 +01:00
Amneesh Singh
fe1103b044 mbox: ti_secproxy: change initialization priority
Remove MBOX_TI_SECURE_PROXY_PRIORITY in favor of MBOX_INIT_PRIORITY which
by default is set to 40, which is desirable so that the priority dependency
on interrupt controllers like ARM GICv3 gets fulfilled. This change is for
convenience of building at default priorities.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-03-03 18:00:13 +01:00
Amneesh Singh
f479c0f1e1 firmware: tisci: change initialization priority
Change priority from KERNEL_INIT_PRIORITY_OBJECTS to
KERNEL_INIT_PRIORITY_DEFAULT so that the priority dependency on TI secure
proxy mailbox fulfilled.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-03-03 18:00:13 +01:00
Amneesh Singh
92ed4ba238 clock_control: tisci: change initialization priority
Change priority from KERNEL_INIT_PRIORITY_OBJECTS to
KERNEL_INIT_PRIORITY_DEFAULT so that the priority dependency on TISCI
protocol/firmware layer gets fulfilled.

Signed-off-by: Amneesh Singh <amneesh@ti.com>
2026-03-03 18:00:13 +01:00
Pieter De Gendt
0f643d21c4 tests: net: ip: Add tests for IPv6 mapped addresses
Test helper functions to create/get/validate IPv6 addresses mapped to IPv4.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-03 17:59:26 +01:00
Pieter De Gendt
01661b6553 net: ip: Add net_ipv6_addr_get_v4_mapped
Add a helper function to extract an IPv4 address from a mapped IPv6 one.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2026-03-03 17:59:26 +01:00
Andrej Butok
2d17d0c613 dts: nxp: mcx: delete "nxp,cmc-reset-cause" compatible
- Deletes virtual "nxp,cmc-reset-cause" compatible,
  as it is covered by existing "nxp,cmc".
- Fixes the issue discovered during discussion in
  https://github.com/zephyrproject-rtos/zephyr/issues/104464
  #issuecomment-3957779329

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2026-03-03 17:59:07 +01:00
Ryan McClelland
fc12039b08 drivers: i2c: rtio: add NULL check before accessing CQE
rtio_cqe_consume() can return NULL, but the result is dereferenced
and released without any NULL check. Add a NULL guard to avoid a
NULL pointer dereference, returning -EIO on failure.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-03-03 17:58:44 +01:00
Ryan McClelland
17dcbd5bdc drivers: i3c: rtio: avoid releasing NULL CQE
rtio_cqe_release() is called unconditionally after rtio_cqe_consume(),
but if the consume returns NULL, this passes a NULL pointer to the
release function. Move the release call inside the non-NULL branch.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2026-03-03 17:58:44 +01:00
Peter Wang
89c48a9e39 board: nxp: frdm_mcxa577: enable i2c driver
1. enable i2c driver for frdm_mcxa577
2. tested tests/driver/i2c/i2c_target_api

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2026-03-03 17:58:05 +01:00
Peter Wang
9ca9b5dd96 board: nxp: frdm_mcxa577: enable spi driver
1. enable spi driver for frdm_mcxa577
2. tested tests/driver/spi/spi_loopback

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2026-03-03 17:58:05 +01:00
Peter Wang
0431850f9d board: nxp: frdm_mcxa577: enable adc driver
1. enable adc driver for frdm_mcxa577
2. tested tests/drivers/adc/adc_api/

Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
2026-03-03 17:58:05 +01:00
Nicolas Pitre
0e372b687c arm64: mmu: support memory domain de-initialization
Implement arch_mem_domain_deinit() for ARM64 to release page tables
back to the pool when a memory domain is de-initialized. This reuses
the existing discard_table() mechanism to recursively free all
sub-tables in the hierarchy.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2026-03-03 17:57:44 +01:00
Gaetan Perrot
4d4cbe39d0 tests: bluetooth: controller: mock_ctrl: ll_assert: fix printf format
Use the correct unsigned format specifier to match the uint32_t line
argument.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-03-03 17:57:21 +01:00
Lyle Zhu
9211d541d9 Bluetooth: Classic: shell: Increase RX stack size
Increase the Bluetooth RX stack size from the default to 2048 bytes in
the BR/EDR shell test configuration. This provides additional stack
space needed for processing complex Bluetooth Classic operations,
particularly when handling nested SDP attribute parsing.

The increased stack size ensures:
- Sufficient space for recursive SDP attribute parsing
- Prevention of stack overflow during BR/EDR operations

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-03 17:57:11 +01:00
Lyle Zhu
9db318da9a Bluetooth: Classic: SDP: Add zero-length data element check
Add validation to detect and handle zero-length data elements during
SDP attribute parsing. When the parsed data element length is zero,
log a debug message and return early to avoid unnecessary processing.

This check is placed after parsing the data element length but before
the nesting level validation, ensuring that:
- Empty data elements are gracefully handled without errors
- The parser doesn't attempt to process or skip zero bytes of data
- Subsequent attribute parsing continues normally

This prevents potential issues when SDP records contain empty data
elements and improves parser robustness when handling malformed or
edge-case SDP attribute structures.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-03 17:57:11 +01:00
Lyle Zhu
85bbfef282 Bluetooth: Classic: SDP: Fix nesting level check timing
Move the nesting level check to occur after parsing the data element
length instead of before. This ensures that when the maximum nesting
level is exceeded, the parser can properly skip the nested data by
pulling the correct length from the buffer.

Previously, checking the nesting level before parsing the length meant
the parser would return early without consuming the nested data,
potentially causing parsing errors for subsequent attributes.

The updated logic:
- Parses the data element type and length first
- Checks if maximum nesting level is exceeded
- If exceeded, logs a warning and skips the data element entirely
- Otherwise, proceeds with recursive parsing as normal

This prevents buffer misalignment when deeply nested sequences are
encountered in SDP attribute records.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-03 17:57:11 +01:00
Lyle Zhu
f9e21462e2 Bluetooth: Classic: SDP: Fix parsing of nested sequences
Fix SDP attribute parsing to properly handle nested sequences within
attribute values. Previously, when an attribute value itself contained
a sequence, the parser would not recursively parse the nested sequence,
potentially missing nested attribute data.

Add recursive parsing logic that:
- Detects if the current value buffer contains a sequence type
- Recursively calls sdp_attr_parse() with incremented nest level
- Properly handles nested sequence structures in SDP records

This ensures complete parsing of complex SDP attribute structures that
contain sequences within sequences, such as protocol descriptor lists
or service class ID lists with nested elements.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-03-03 17:57:11 +01:00
Dmitrii Sharshakov
d3b5a1fc7e led_strip: add a shell for address RGB LEDs
This shell enables manual interaction with led_strip devices like
WS2812 address LEDs.

Example of interaction:
```
uart:~$ led_strip update_rgb ws2812 111111 111111
Invalid number of colors 2 (max 1)
uart:~$ led_strip update_rgb ws2812 1a0011
ws2812: updating 1 pixels: (26, 0, 17)
uart:~$ led_strip update_rgb ws2812 000011
ws2812: updating 1 pixels: (0, 0, 17)
uart:~$ led_strip update_rgb ws2812 1a2200
ws2812: updating 1 pixels: (26, 34, 0)
```

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2026-03-03 17:56:17 +01:00
Jamie McCrae
fa6c04b411 Revert "lib: heap: compute Z_HEAP_MIN_SIZE from actual struct layouts"
This reverts commit 518d8420c9.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
6cc3ae95b8 Revert "tests: lib: heap: remove test_solo_free_header"
This reverts commit 5d0376f6eb.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
a606bf3b3b Revert "lib: heap: rework chunksz_to_bytes into chunk_usable_bytes"
This reverts commit 81ac81a6d6.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
53dfe2c4b0 Revert "lib: heap: rename solo_free_header() to undersized_chunk()"
This reverts commit b13f7d50f9.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
e7370fe4c2 Revert "lib: heap: add CONFIG_SYS_HEAP_CANARIES for corruption detection"
This reverts commit fbe80ed506.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
41e1465fb4 Revert "tests: lib: heap: add test variants for CONFIG_SYS_HEAP_CANARIES"
This reverts commit 39ff3c4863.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
af10904d25 Revert "lib: heap: extract z_heap_full_check() from sys_heap_validate()"
This reverts commit d7c880c52d.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
9c791f8003 Revert "lib: heap: introduce SYS_HEAP_HARDENING tiered Kconfig"
This reverts commit bec6349cc7.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
99836c2a32 Revert "tests: lib: heap: update test variants for hardening levels"
This reverts commit 9cbe108187.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
4d04515905 Revert "lib: heap: validate canaries on free chunk removal"
This reverts commit d1824fa07a.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
ee61a04c52 Revert "tests: drivers: tee: optee: fix heap corruption from RPC buffer overflows"
This reverts commit b9dd78dc20.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
0114c14734 Revert "samples: mcumgr: smp_svr: disable heap hardening for ram_load variant"
This reverts commit 05828546db.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
976ae48ce9 Revert "cmake: prohibit LTO for heap_constants.c offsets source"
This reverts commit 2d747e55a3.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Jamie McCrae
5a38669420 Revert "boards: qemu: leon3: pass -m 1G to match DTS SRAM size"
This reverts commit 025375d02f.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-03-03 17:55:22 +01:00
Michal Princ
e41289566f samples: drivers: Enabled hwspinlock sample for NXP mimxrt700_evk board
enabled hwspinlock sample for NXP mimxrt700_evk board

Signed-off-by: Michal Princ <michal.princ@nxp.com>
2026-03-03 13:31:38 +01:00
Michal Princ
e9f5d0b4a1 drivers: clock_control: enable sema420, sema423, sema424 clock control
enabled sema420, sema423, sema424 peripheral clock control through
clock_control (syscon) driver

Signed-off-by: Michal Princ <michal.princ@nxp.com>
2026-03-03 13:31:38 +01:00
Michal Princ
fe9b5f7fcd boards: nxp: enable sema42 device node for rt7xx boards.
enabled sema42 device node for mimxrt700_evk board.

Signed-off-by: Michal Princ <michal.princ@nxp.com>
2026-03-03 13:31:38 +01:00
Francois Ramu
ecc8af4a08 drivers: flash: stm32u3 erase with BKER reset on single bank 512K
On the stm32U3 with 512K of flash in a single bank,
reset the BKER bit of the FLASH_CR register.
See RefMan Table Flash module organization"
Note "2. When DUALBANK is set to 0 in the option bytes,
for 512-Kbyte single-bank STM32U375/385 devices,
the flash is addressed as a single bank,
and the page numbers are continuous from 0 to 127.
Set BKER = 0 to select bank 1."

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-03-03 13:30:50 +01:00
Francois Ramu
b844fb6d7f drivers: flash: stm32u3 flash erase or program on voltage scale1
On the stm32U3 series, erase/program operation requires
the voltage range is set to range 1.
This is done before loop on erase/write and the initial voltage
range is restored afterwards.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-03-03 13:30:50 +01:00
Francois Ramu
8167e1c5d9 drivers: flash: stm32u3 flash page layout
On the stm32U3, like it is on the stm32U5 series,
gives the exact nb of pages of 4KB depending on the flash size.
For the page layout, the nb of pages does not depends on the
DUALBANK option byte.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2026-03-03 13:30:50 +01:00
Johan Hedberg
0617c72457 modules: hal_silabs: Fix linking for Bluetooth Channel Sounding
RAIL depends on the LDMA and TIMER peripherals when Bluetooth Channel
Sounding support has been enabled, so be sure to include those in the
build for such configurations.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2026-03-03 13:30:27 +01:00
Magdalena Szumny
9227aa7880 net: nsos: add getpeername and getsockname
Add implementation of getpeername and getsockname to NSOS driver.

Signed-off-by: Magdalena Szumny <magdalena.szumny@assaabloy.com>
2026-03-03 13:29:14 +01:00
Maciej Sobkowski
9455a002a8 scripts: instrumentation: Deduplicate code in zaru script
Removes code duplications and changes uses of Perfetto (viewer) to Trace
Event (format)

Signed-off-by: Maciej Sobkowski <msobkowski@antmicro.com>
Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
Signed-off-by: Eryk Szpotanski <eszpotanski@antmicro.com>
2026-03-03 13:28:58 +01:00
Nhut Nguyen
32dda0826f tests: drivers: gpio: Enable gpio tests for RZ/G3E-SMARC
Enable GPIO tests for Renesas RZ/G3E-SMARC

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-03 13:28:32 +01:00
Nhut Nguyen
b0cfb78172 drivers: intc: Add support for Renesas RZ/G3E
Update GPIO interrupt (TINT) to support Renesas RZ/G3E

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-03 13:28:32 +01:00
Hoang Nguyen
e42c9ac45c drivers: serial: Add support for Renesas RZ/G3E
Add serial driver support for Renesas RZ/G3E

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-03 13:28:32 +01:00
Hoang Nguyen
de725be58b drivers: pinctrl: Add support for Renesas RZ/G3E
Add pinctrl support for Renesas RZ/G3E

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-03 13:28:32 +01:00
Hoang Nguyen
e3bab3a227 boards: renesas: Add minimal support for board RZ/G3E-SMARC
This adds minimal support for board RZ/G3E-SMARC

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-03 13:28:32 +01:00
Hoang Nguyen
81d7169969 dts: arm: renesas: Add support for Renesas RZ/G3E
Add devicetree to support for Renesas RZ/G3E

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2026-03-03 13:28:32 +01:00