Commit graph

24,075 commits

Author SHA1 Message Date
Anas Nashif
fc4db3dd1d tracing: ctf: do not use signal as an argument
Violates coding guideline rule 21.2

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
21e44ea8d4 tracing: systemview: add tracing for mail boxes
Add missing hooks for mail boxes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
a6dee79282 tracing: systemview: add tracing for events
Add missing hooks for events.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
59a3fe86d3 tracing: systemview: add tracing for stacks
Add missing hooks for stack objects.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
539308f336 tracing: systemview: add tracing for message queues
Add missing hooks for message queues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
63582601f2 tracing: ctf: add event support
Add hooks for events.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
61dd33445e tracing: ctf: add mbox support
Add hooks for mail boxes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
1823d4cf18 tracing: ctf: thread extended
Add more thread related tracing functions.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
906db71942 tracing: ctf: add poll
Add hooks for poll object.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
ba453c1337 tracing: ctf: add work queues
Add hooks for work queues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
e23d663b85 tracing: ctf: add condition variables
Add hooks for condition variables.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
26fa18ef2d tracing: ctf: add tracing for message queues
Add hooks for message queues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
9e99699167 tracing: ctf: add tracing for memory slabs
Add hooks for memory slabs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
7b1e72474c tracing: ctf: add missing return value for mutex_unlock
Add missing return for mutex_unlock.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Anas Nashif
afef4b6a17 tracing: add semihosting backend
Using semihosting on supported architectures (arm, xtensa, riscv) it now
possible to generate tracing giles easily and without being restricted
by size.
Using qemu for example, it is now possible to generate the tracing file
simply by running:

 west build -p -b mps2/an385 tests/kernel/msgq/msgq_api/ \
 	-t run --snippet semihost-tracing

This will generate a tracing file in the build/ directory which can be
viewed with babeltrace.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-25 15:59:19 +03:00
Yong Cong Sin
e8a4b9e303 shell: modules: devmem: support 64-bit read & write
Add support for 64-bit devmem operations for 64-bit devices.

Signed-off-by: Sergii Vystoropskyi <vistorop@meta.com>
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2025-10-25 10:46:27 +03:00
Valerio Setti
fa911df90c modules: mbedtls: rename MBEDTLS_DTLS
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
f960db846c modules: mbedtls: rename MBEDTLS_TLS_VERSION_1_2
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Valerio Setti
e1117f18fc modules: mbedtls: rename MBEDTLS_MD
Align Kconfig name to the Mbed TLS build symbol.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-24 13:27:59 -04:00
Alain Volmat
e7ae828f70 usb: usbd_uvc: add frame_based support (currently only H264)
The frame_based descriptors differ from the frame descriptors
in that there is no dwMaxVideoFrameBufferSize field.
In order to do that, add a new uvc_frame_based_discrete_descriptor
structure to be used to fill in proper information into the
frame descriptor. In addition to that, a new format descriptor
is also added for frame based transfer.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Alain Volmat
0e3de8e3ca usb: uvc: use struct uvc_frame_descriptor in most of function parameters
This commit prepares introduction of the UVC Frame Based support by
using the struct uvc_frame_descriptor as parameter of most of the UVC
functions. struct uvc_frame_descriptor contains the common fields for
all supported frame type and then depending on the DescriptorSubtype
the pointer is casted in the correct struct definition.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-10-24 13:25:34 -04:00
Pieter De Gendt
d43b48daf5 net: l2: wifi: mgmt: Fix auto-connect with multiple saved credentials
Using the Wi-Fi credentials system, we need to stop connecting with stored
credentials once a connection has been successful.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-10-24 13:19:21 -04:00
Vinayak Kariappa Chettimada
4428c1a868 Bluetooth: Controller: nRF54Lx: Enable Controller Privacy Support
Enable Controller Privacy support for nRF54Lx as default.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-24 08:50:49 -07:00
Vinayak Kariappa Chettimada
6d79d52118 Bluetooth: Controller: nRF54Lx: Add Controller Privacy Support
Add Controller Privacy support for nRF54Lx by porting to
use NRF_AAR00 h/w peripheral.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-24 08:50:49 -07:00
Kai Cheng
038523c63b Bluetooth: Conn: add connection type helper functions
Introduce dedicated helper functions for connection type checking:
- bt_conn_is_br() for BR/EDR connections
- bt_conn_is_le() for LE connections
- bt_conn_is_iso() for ISO connections
- bt_conn_is_sco() for SCO connections

Replace direct conn->type comparisons with these new helper functions
throughout the connection management code. This improves code readability,
maintainability, and provides proper configuration checks for each
connection type.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-10-24 11:34:41 +02:00
Lyle Zhu
74e94fd8e9 Bluetooth: SDP: Optimize functions bt_sdp_get_XXX()
Use a combination of multiple helper functions to implement the
functionality of existing interfaces starting with `bt_sdp_get_`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
922da6cc4d Bluetooth: classic: shell: Support attribute parsing helper
Update the command `sdp-find` to support attribute parsing helper.
If the argument count is 1, the general SDP discovery will be used
to discover the protocol `L2CAP`.

In the SDP record discovered callback, call attribute parsing helper
functions to parse the SDP record and SDP attributes. And print all
parsed attribute values.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
7f04884eab Bluetooth: SDP: Add helper functions to parse discovered record
The current implementation does not support multiple attributes with
the same attribute identifier in a discovered SDP record.

Add function `bt_sdp_record_parse()` to parse the received SDP record.

Add function `bt_sdp_has_attr()` to check if the specified attribute
identifier has been discovered.

Add function `bt_sdp_get_attr()` to get the attribute of specified
attribute identifier.

Add function `bt_sdp_attr_value_parse()` to parse the attribute value.

Add function `bt_sdp_attr_has_uuid()` to check if the attribute
contains the specified UUID.

Add function `bt_sdp_attr_read()` to read the value of the attribute.

Add function `bt_sdp_attr_addl_proto_parse()` to parse the protocol
descriptor from the additional protocol descriptor list.

Add function `bt_sdp_attr_addl_proto_count()` to get the protocol
descriptor count of the additional protocol descriptor list.

Add function `bt_sdp_attr_addl_proto_read()` to read the attribute
value from the additional protocol descriptor list for specific index
and UUID.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Lyle Zhu
8365ed718e Bluetooth: Classic: SDP: Add protocol identifier codes
Add all protocol identifier codes defined in Assigned Numbers
specification.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-24 11:34:32 +02:00
Patryk Duda
a1a91262c4 testsuite: Do not specify dump method if hardware coverage is not set
After #94079, CONFIG_COVERAGE_DUMP is enabled even if CONFIG_COVERAGE is
not set. As a result CONFIG_ZTEST_NO_YIELD is disabled which has some
implications on other tests.

Coverage dump method is necessary only if coverage is collected on
hardware, which is enabled by CONFIG_COVERAGE_GCOV. Let's specify
default dump method, only if CONFIG_COVERAGE_GCOV is set.

Fixes: #94079
Signed-off-by: Patryk Duda <patrykd@google.com>
2025-10-23 15:53:10 -04:00
Jordan Yates
0d86ebb83b llext: load: memcpy section header
When loading from `.elf` files, it is not guaranteed that section
headers are word aligned with the `.elf` file. Attempting to perform
a direct assignment results in the compiler assuming the input pointer
is aligned, resulting in usage faults if the assumption is broken.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-23 18:04:34 +02:00
Ricardo Cañuelo Navarro
61e177f521 Bluetooth: Host: remove unnecessary assignment in bt_conn_unref()
This local pointer assignment does nothing and readers may get a wrong
interpretation of the intention of the function.

Signed-off-by: Ricardo Cañuelo Navarro <rcn@igalia.com>
2025-10-23 18:04:18 +02:00
Valerio Setti
9c13bfd5d7 net: ip: ipv6: replace legacy crypto with PSA API
Zephyr's long term goal for crypto support is to use only PSA API. This
commit replaces usages of MD with proper PSA API for HMAC.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-23 18:02:56 +02:00
Valerio Setti
00eee1ad78 jwt: deprecate CONFIG_JWT_SIGN_RSA_LEGACY
With the long term goal to transition all crypto support toward PSA API,
this commit deprecates CONFIG_JWT_SIGN_RSA_LEGACY.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2025-10-23 18:02:37 +02:00
Vinayak Kariappa Chettimada
d737e285e5 Bluetooth: Controller: Add code comments related to short prepare
Add code comments explaining the handling of short prepare
that can be enqueued out of order and present in use of FIFO
for prepare pipeline.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-23 17:56:05 +02:00
Emil Gydesen
f487439fbc Bluetooth: ISO: Fix issue with CIG being terminated
In the case of a CIG having multiple CIS, and all CIS has been
requested to being disconnected (i.e. they all enter the
BT_ISO_STATE_DISCONNECTING state), then when the first disconnect
complete is handled in bt_iso_chan_disconnected, then the
cig->state was prematurely set to BT_ISO_CIG_STATE_INACTIVE.
This meant that if the application called bt_iso_cig_terminate
when the 2nd CIS entered bt_iso_chan_disconnected and called
chan->ops->disconnected(chan, reason) then the CIG would be
removed. When the CIS then entered bt_iso_cleanup_acl, it
would access removed data from cleanup_cig.

Change bt_iso_chan_disconnected to not allow the termination
of the CIG until all CIS have entered the BT_ISO_STATE_DISCONNECTED
state.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-23 17:51:18 +02:00
Mark Wang
3c4b4e1ae2 usb: device_next: msc: do not copy SCSI data
Support only power-of-two disk sector sizes to enable significant
throughput improvements:
  * SCSI data zero-copy
  * allow queuing multi-packet transfers

Previously large SCSI buffers did not improve performance. With this
change, larger SCSI buffer allows scheduling bigger USB transfers which
reduces overhead.

Co-authored-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-10-23 17:47:23 +02:00
Josuah Demangeon
74e147e886 usb: device_next: uvc: remove application decisions from the UVC class
The UVC class was deciding itself which formats were sent to the host.
Remove this logic out of the UVC class and introduce uvc_add_format() to
give the application the freedom of which format to list.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-23 17:47:12 +02:00
Josuah Demangeon
9771105768 usb: device_next: uvc: use fmt->size instead of computing it every time
Make use of the recently merged fmt->size to know the maximum size of the
frame to be allocated, which works for both compressed and uncompressed
video.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-23 17:47:12 +02:00
Josuah Demangeon
bd1f72b0ba usb: device_next: uvc: propagate descriptor error to the application
When running out of descriptor, return an error instead of ignoring it.
The application need to make sure to adjust the Kconfig macros to have
enough descriptors for all formats to add.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-10-23 17:47:12 +02:00
Vinayak Kariappa Chettimada
29cf367568 samples: Bluetooth: hci_ipc: Enable HCI vendor-specific h/w error event
Enable HCI vendor-specific h/w error event generation in
samples and tests.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-23 11:43:10 +03:00
Vinayak Kariappa Chettimada
5db80f0d57 Bluetooth: Controller: Reduce assertion check code size
Reduce Controller assertion check code size for ARM Cortex-M
CPUs by using the undefined instruction exception.

`arm-none-eabi-addr2line` commandline can be used to get the
source file and line number.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-23 11:43:10 +03:00
Vinayak Kariappa Chettimada
796c0002f8 Bluetooth: Controller: Introduce LL_ASSERT_DBG/ERR
Introduce development and fatal assertion classification
in the Controller implementation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-23 11:43:10 +03:00
Vinayak Kariappa Chettimada
625f3052f5 Bluetooth: Controller: nRF54L: Fix PPIB interface include cond compile
Fix trivial PPIB interface include conditional compile.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-23 11:41:25 +03:00
Jordan Yates
51b424e2f0 tests: modem: ppp: test custom ACCM's
Test the wrapping functions with custom asynchronous command character
maps.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-23 08:02:28 +02:00
Jordan Yates
4494b42372 modem: ppp: use peer control character map
Use the peers asychronous control character map to only escape
characters that need to be, instead of always escaping bytes 0 to 31.

For data packets with values randomly distributed, this results in 11%
fewer bytes needing to be transmitted over the link, if no bytes need to
be escaped (256+2)/(256+2+32).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-23 08:02:28 +02:00
Jordan Yates
fbb84c7c0c net: l2: ppp: lcp: accept ASYNC_CTRL_CHAR_MAP option
Accept the `ASYNC_CTRL_CHAR_MAP` option in configuration messages from
the peer. The map is reset to the default value each time the interface
comes up.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-23 08:02:28 +02:00
Jordan Yates
13d35288bd net: l2: ppp: expose the peer ACCM
Expose the currently configured value for the PPP peers Asynchronous
Control Character Map through a public function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-10-23 08:02:28 +02:00
Michael Zimmermann
4b2cbe8d4d net: mqtt_sn: fix returning address from zsock_recvfrom
The fix in 1264a923f3 was incomplete, because
it doesn't initialize the variable. To quote from opengroup [1]:
address_len
    Either a null pointer, if address is a null pointer, or a pointer to a
    socklen_t object which on input specifies the length of the supplied
    sockaddr structure, and on output specifies the length of the stored
    address.

This caused the returned address to be incomplete, because it got truncated
depending on what addrlen_local got initialized with implicitly. This broke
talking to discovered MQTT-SN gateways.

I intend to implement integration tests for the MQTT-SN UDP transport to
prevent such issues in future, but that will be done in a separate PR.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/recvfrom.html

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-10-22 18:05:41 -04:00
Kai Cheng
1de17dcf0a Bluetooth: shell: add sniff mode control command
Add shell command for testing BR/EDR power mode control. Supports
entering sniff mode with configurable parameters (min/max interval,
attempt, timeout) and exiting back to active mode. Provides real-time
feedback on mode change requests and status.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-10-22 18:34:33 +03:00