Commit graph

100853 commits

Author SHA1 Message Date
Jukka Rissanen
5b41ea7863 net: ipv6: Do not print error for non-erros for incoming NS
If we receive incoming neighbor solicitation packet and drop
it for some reason, ignore some of the errors which are not
really errors so that the icmpv6 handler does not complain.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-26 11:07:59 -04:00
Jukka Rissanen
9c5e59085d net: ipv6: Allow incoming DAD NS message
Make sure that incoming DAD NS message is allowed in
so that we can detect duplicate address detection NS packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-26 11:07:59 -04:00
Nicolas Pitre
57b2eaa09b demand_paging: LRU eviction: add missing documentation
Document missing eviction algorithm interface functions, and mention LRU.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-26 17:07:49 +02:00
Reto Schneider
7f1c3d1841 twister: runner: j-link: Fix parameter passing
To specify the serial number, JLink expects either one argument
('--dev-id=xxx') or two (e.g. '--dev-id' 'xxx'), but it can not deal
with a single one that is '--dev-id xxx'.

The problem has been introduced (or just made visible?) by commit
5ee4284320 (twister: runner: j-link: use
dev-id instead of SelectEmuBySN) in PR #76931.

How to reproduce:

1. Create a HW configuration map, e.g.:

```
$ cat zephyr-hw-map-nrf52840dk-1.yml
- connected: true
  id: '683517317'
  platform: nrf52840dk/nrf52840
  product: nRF52840 DK 1
  runner: jlink
  serial: /dev/ttyACM-nrf-dk-1
```

2. Run test `logging.dictionary` with Twister:

```
$ west twister --platform nrf52840dk/nrf52840 --device-testing \
  --hardware-map zephyr-hw-map-nrf52840dk-1.yml -s logging.dictionary
```

3. The build will fail, and the `twister_harness.log` contains:

```
10:21:24.375:DEBUG:twister_harness.device.factory: Get device type
  "hardware"
10:21:24.375:DEBUG:twister_harness.device.hardware_adapter: Opening
  serial connection for /dev/ttyACM-nrf-dk-1
10:21:24.376:DEBUG:twister_harness.device.hardware_adapter: Flashing
  device 683517317
10:21:24.376:DEBUG:twister_harness.device.hardware_adapter: Flashing
  command: <snip>/bin/west flash --skip-rebuild --build-dir
  twister-out/<snip>/tests/subsys/logging/dictionary/logging.dictionary
  --runner jlink '--dev-id 683517317'
10:21:24.590:ERROR:twister_harness.device.hardware_adapter: Could not
  flash device 683517317
10:21:24.592:DEBUG:twister_harness.device.hardware_adapter: Closed
  serial connection for /dev/ttyACM-nrf-dk-1
```
(note the '--dev-id 683517317' part)

4. Running the stated `west flash` command shows the following error
   message:

```
-- west flash: using runner jlink
FATAL ERROR: runner jlink received unknown arguments: ['--dev-id
  683517317']
```

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 17:07:40 +02:00
Benjamin Cabé
b3776ca97c doc: fix issue with keydown/keyup being ignored
Ensure initial search menu visibility is properly set so that key
events don't get trapped preventing arrow key navigation on the
document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-26 11:07:30 -04:00
Lluis Campos
7075c69419 doc: esp32: Update board identifier
Clears CMake warning:
```
Deprecated BOARD=esp32_ethernet_kit specified, board automatically changed
  to: esp32_ethernet_kit/esp32/procpu.
```

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2024-08-26 11:06:55 -04:00
Florian Grandel
9d1874f7f9 net: capture: enable capturing of IPv6/v4 only
Net capturing would not link when either IPv6 or IPv4 was switched off
due to missing symbols. This change allows for capturing a single IP
protocol only.

To reproduce:

samples/net/sockets/http_client/prj.conf
```
-CONFIG_NET_IPV4=y
+CONFIG_NET_IPV4=n
-CONFIG_NET_CONFIG_NEED_IPV4=y
+CONFIG_NET_CONFIG_NEED_IPV4=n
+
+CONFIG_NET_CAPTURE=y
```

This will cause the following linker error:
```
.../subsys/net/lib/capture/capture.c:648:
    undefined reference to `net_if_ipv4_get_ttl'
```

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
c19feadbdb net: l2: ieee802154: 6lo_fragment: improved error message
Improved error messages, especially the fragment cache message that
occurs very often.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
d4729dfa36 net: l2: ieee802154: mgmt: improved logging
Improved debuggability of IEEE 802.15.4 network management commands.
Some of these conditions were especially hard to debug (e.g. invalid
channels due to the wrong driver being selected, conflict between
settings, ...)

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
0e6769719c samples: net: http_client/server: add IEEE 802.15.4 support
Adds overlays to support HTTP over IEEE 802.15.4 (including SubG for a
sample SoC).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
adbbf05b19 samples: net: http_client/server: add logging boilerplate
Added some additional useful logging configuration for convenience
(default: off).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
bc1b85c47f samples: net: http_client: increase resource requirements
Low throughput links (e.g. IEEE 802.15.4) require additional stack and
buffering resources. Therefore some stack and buffer pool sizes were
increased to cater for over-the-air scenarios.

Fixes: #77287

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Lucas Tamborrino
9938022eff drivers: video: ov2640: Add 240x240 video format
Add 240x240 RGB format support for OV2640.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-26 17:06:28 +02:00
Laurentiu Mihalcea
2b96bfb2e5 drivers: dma: dma_nxp_sof_host_dma: do cache WB after HOST_TO_MEMORY copy
SOF is designed with the idea that the data transfer
between the host memory and local memory is performed via
DMA. This is not true for imx platform in which the DSP
performs this operation.

Because of the aforementioned design, SOF performs a
cache invalidation operation on the destination memory
region before data is copied further down the pipeline.

For some imx platforms, the destination memory region is
cacheable. As such, some of the data transferred from the
host memory region is held entirely in cache, which means
the RAM and the cache have different data for the same
memory region.

In such cases, performing cache invalidation forces
the DSP to fetch data from RAM instead of the cache, which
means the DSP will read stale data and propagate it further
down the pipeline.

Although not optimal and mostly as a workaround to this issue,
perform a cache WB operation on the destination memory region
to make sure that the cache and the RAM hold the same data.
During the data read operation (to copy it further down the
pipeline) after the aforemention cache invalidation, the DSP
will no longer end up reading stale data.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-26 17:06:20 +02:00
Elias Speinle
c4dba39548 drivers: fpga: add driver for renesas slg471X5
add driver for renesas slg471X5

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-08-26 17:06:14 +02:00
Raffael Rostagno
2ea9483009 drivers: spi: esp32c2: esp8684: Add support
Addded support to SPI2 module for ESP32C2 and ESP8684 devices

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 17:06:02 +02:00
Jimmy Zheng
a7096fac7d drivers: interrupt_controller: nuclei_eclic: always use clic common entry
When CONFIG_RISCV_VECTORED_MODE is disabled, CLIC claims interrupts using
CSR 'mnxti' and handles all pending interrupts before exiting the ISR.

When CONFIG_RISCV_VECTORED_MODE is enabled, all interrupts use vector mode
and are claimed automatically. The RISC-V common ISR is used for interrupts
hooked into SW ISR table, but it only handle one pending interrupt per ISR.

This commit enhances CLIC to set vector mode for direct ISRs only and use
the CLIC common entry for regular ISRs to handles multiple pending
interrupts in an ISR.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
d55950c23f drivers: interrupt_controller: nuclei_eclic: support vector mode setting
Implement riscv_clic_irq_vector_set() for Nuclei CLIC driver.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
91e524862d soc: common: riscv-privileged: add riscv_clic_irq_vector_set() for clic
Introduce riscv_clic_irq_vector_set() to implement z_riscv_irq_vector_set()
for CLIC. This commit also introduces CONFIG_CLIC_SMCLICSHV_EXT to indicate
support for the smclicshv extenion and riscv_clic_irq_vector_set().

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
9ec596674b arch: riscv: add z_riscv_irq_vector_set() to set vector ISR
Introduce z_riscv_irq_vector_set() to hook into ARCH_IRQ_DIRECT_CONNECT(),
allowing users to set vector mode for a specified ISR.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jordan Yates
2f143fb2c1 doc: add make html-live and html-live-fast
Add two new commands that automatically locally host the generated
documentation upon completion and rebuild/rehost when the input files
change without any user interaction.

For more info see: https://pypi.org/project/sphinx-autobuild/

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:05:39 +02:00
Jordan Yates
2e99de8047 doc: conf.py: build directory from environment
Get the output directory from environment variables instead of
attempting to reparse the CLI arguments, as these can actually refer
to a program other than `sphinx-build` (for example `sphinx-autobuild`).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:05:39 +02:00
Jamie McCrae
09a67ad678 doc: release: 4.0: Add note on new MCUmgr enum mgmt group
Adds a note about this new group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
edee1ed9a0 tests: mgmt: mcumgr: Add enum_mgmt test
Adds a test that checks the functionality of this new management
group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
4f5c6da4e5 doc: mcumgr: Add documentation for SMP group 10 (enum)
Adds documentation for enumeration management group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
e577b140c3 mgmt: mcumgr: grp: Add names to groups when Kconfig is enabled
Adds string names to the groups in MCUmgr when the enum mgmt
Kconfig is enabled to support listing names of groups

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
fc40e836d1 mgmt: mcumgr: grp: Add enumeration management group
Adds a new MCUmgr group which allows for listing which groups are
supported by the MCUmgr server by remote devices.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
b28ccc207d mgmt: mcumgr: mgmt: Add group callback function
Adds a group callback function which can be used to iterate over
all the registered MCUmgr command groups

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Raffael Rostagno
3c19c85b32 drivers: clock_control: esp32c6: Fix for USB/JTAG port
Fixes non-working JTAG port when serial USB is not enabled.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 11:05:19 -04:00
Fabrice DJIATSA
9e4c554487 dts: arm: st: remove clock node from parent node soc
Since the clock node is not a child node of the soc node,
but from the root node.
This removes the warning log at compilation.


Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-08-26 11:05:00 -04:00
Erwan Gouriou
a078b4ee6b drivers: bluetooth: hci: Remove prompt on non user selectable symbols
Most of BT_FOO symbols that are designed to select the hci driver
implementation which will drive the comunication with controller are
selected based on device tree compatible and should not be made available
as an configurable option to the user.
To do this, remove the prompt on these symbols.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-26 11:04:45 -04:00
Jilay Pandya
f29377a12c mbedtls: remove stray uses of MBEDTLS_ZEPHYR_ENTROPY
This commit replaces stray uses of MBEDTLS_ZEPHYR_ENTROPY with
MBEDTLS_ENTROPY_POLL_ZEPHYR

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-25 11:21:26 +02:00
Jilay Pandya
d08864c4b3 mbedtls: remove stray uses MBEDTLS_ENTROPY_ENABLED
This commit replaces stray uses of MBEDTLS_ENTROPY_ENABLED with
MBED_TLS_ENTROPY_C

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-25 11:21:26 +02:00
Marcin Niestroj
6b8ebeb9d1 samples: sockets: echo_server: test on native_sim/native/64
Add 64-bit platform to allowed, so it is tested by twister.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-08-24 19:22:42 -05:00
Declan Snyder
5f541431d6 soc: imxrtxxx: Fix flexspi boot issue
FCB was being relocated to the wrong location, and the flexspi clock
setup was not being relocated.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-24 19:22:23 -05:00
Jyri Sarha
746ddccf54 intel_adsp: debug_window: Add slot type for debug-stream transport
Add slot type for debug-stream transport over a debug window slot. For
details see src/debug/debug_stream/debug_stream_slot.h under SOF
sources [1].

[1] https://github.com/thesofproject/sof

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2024-08-24 19:21:57 -05:00
Anas Nashif
376085c9ed tests: kernel: add missing test call argument
Add missing param argument.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-24 07:17:15 -04:00
Josuah Demangeon
c0f8658254 drivers: video: accept VIDEO_EP_ALL where VIDEO_EP_IN/OUT is given
The current video drivers did not allow VIDEO_EP_ALL to be selected,
as used by video_stream_stop().

This adds the VIDEO_EP_ALL to each video driver that filtered endpoints.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-08-24 07:17:03 -04:00
Josuah Demangeon
9eb258c7f6 drivers: video: allow to specify individual ep with ID >= 0
This define the enum values so that they never clash with custom
endpoint IDs passed numerically, for devices that supports more
than one IN or OUT enpoint.

This also documents semantics for VIDEO_EP_IN/OUT/ALL/NONE,
while renaming VIDEO_EP_ANY to VIDEO_EP_ALL to remove the
ambiguity when there are several IN and/or OUT endpoints.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-08-24 07:17:03 -04:00
Valerio Setti
f23d800094 test: mbedtls: new test for PSA crypto initialization and RNG configuration
Add a simple test to showcase how RNG can be configured on different
platforms in order to allow Mbed TLS's PSA crypto implementation to
work properly.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
e26f00fc5f mbedtls: move entropy polling functions to a dedicated file
This commit just moves some code around. For sake of cleanliness
a new file is added to hold the entropy parsing functions
for Mbed TLS.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
5ef44fdd8c mbedtls: add new kconfig for non-CSPRNG sources in psa_generate_random()
This is meant to be used only for tests on platforms where CSPRNG
sources are not available. It should not be used in production.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
6523fb3cb0 mbedtls: improve description of PSA random number generators
Improve the description of both MBEDTLS_PSA_CRYPTO_LEGACY_RNG and
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG kconfig symbols.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
98ddf107fa mbedtls: rename CONFIG_MBEDTLS_ZEPHYR_ENTROPY and move it
- Slightly improve the name of this kconfig adding the suffix
  _POLL in order to highlight that this adds a callback
  function used to poll data.

- Description was also updated to point out that this symbols
  might not only use the (secure) entropy driver, but also
  generic number generators, some of which are not really
  secure.

- The symbol was move from Kconfig to Kconfig.tls-generic because
  this is where MBEDTLS_ENTROPY_C is located and since
  MBEDTLS_ENTROPY_HARDWARE_ALT depends on the former (it only
  makes sense if the entropy module is also enabled), we add
  also the "depends on".

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Valerio Setti
e3e13fb40b mbedtls: rename MBEDTLS_ENTROPY_ENABLED as MBEDTLS_ENTROPY_C
ENABLED suffix does not really makes much sense for a kconfig
so it should be removed. Also other MBEDTLS symbols were recently
updated accordingly.
Moreover having it named exactly the same way as in Mbed TLS
symplifies the understanding of what this kconfig is doing.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-08-24 07:16:51 -04:00
Daniel Leung
8d53b506a2 kernel: remove deprecated macro K_THREAD_STACK_MEMBER
Remove the macro K_THREAD_STACK_MEMBER that has been
deprecated since v3.5.0.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:16:38 -04:00
Simone Orru
ad208e1e7c modules: mbedtls: Enable PEM writing when PEM cert format is selected
Enable the `MBEDTLS_PEM_WRITE_C` mbedtls configuration option when
`CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT` is selected.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2024-08-24 07:16:25 -04:00
Lucien Zhao
fd1c057f18 boards: nxp: mimxrt1180_evk: change to use hyperram as RAM region
Change to use hyperram as RAM region
Enable external mem kconfig

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-24 07:16:11 -04:00
Lucien Zhao
8077a74621 dts: arm: nxp: add ITCM/DTCM region into linker
add ITCM/DTCM region into linker file

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-24 07:16:11 -04:00
Lucien Zhao
1b90b46f75 soc: nxp: imxrt: support external memory hyperram
add xmcd data section to save xmcd data in linker.ld

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-24 07:16:11 -04:00