Commit graph

89703 commits

Author SHA1 Message Date
Guennadi Liakhovetski
ca12fd13c6 xtensa: intel_adsp: fix a cache handling error
.bss and .data are uncached in Zephyr builds for intel_adsp. No need
to try to manipulate cache of objects in those sections.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-01-15 09:59:07 +01:00
Jonathan Rico
75c2aeb8bd Bluetooth: L2CAP: stop stealing buffers from SDU pool
It seems like a nice idea at first, but leads to hard-to-debug
situations for the application.

The previous behavior can be implemented by the app by defining
`alloc_seg` and allocating from the same pool as `buf`.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-01-15 09:58:58 +01:00
Damian Krolik
7b42e36c68 net: openthread: Print the actual assert location
When OpenThread application is built with CONFIG_ASSERT
and CONFIG_ASSERT_NO_MSG_INFO, OT_ASSERT() prints a location
that points to the otPlatAssertFail() function instead of
the code that actually failed an assertion.

This is confusing and CONFIG_ASSERT_NO_MSG_INFO sometimes
cannot be disabled because of flash size limitations.

Make otPlatAssertFail() always print the actual assert
location.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2024-01-15 09:58:48 +01:00
Krzysztof Chruściński
5bafa25e13 logging: Use strings stripping for dictionary backends
Enabled by default strings stripping for dictionary based
backends.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:58:39 +01:00
Krzysztof Chruściński
b9bf596b34 logging: Fix LOG_FMT_SECTION_STRIP Kconfig dependency
Strings stripping was disallowed when LOG_OUTPUT was used. However,
there is a dictionary log_output module which could work with stripped
strings. Dependency is changed to LOG_DICTIONARY_SUPPORT.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:58:39 +01:00
Alberto Escolar Piedras
972a4d9f6f tests/kernel/context: Improve to resist parallel threads interrupting
This test assumes that nothing will wake the CPU apart from
the timer set by the test.
But that is not necessarily the case.
Some other platform thread started at boot
may be waking the CPU every now and then.

Let's allow for some spurious wakes while we are testing k_cpu_idle,
while at the same time ensuring we are not just busy waiting
all the way.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-15 09:58:26 +01:00
Gerard Marull-Paretas
6876f9eea1 soc: riscv: riscv-privileged: drop soc_common.h
The header file is no longer needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
3ed16b38e5 drivers: serial: b91: add missing RISC-V PLIC header
Driver was using PLIC without including necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
87bb281a9f drivers: ieee802154: b91: add missing PLIC include
Driver was using RISC-V PLIC API without including the necessary
headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
992f25b0c9 drivers: gpio: b91: add missing PLIC header
Driver is using the RISC-V PLIC interrupt controller without including
the necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
36069b6c9a drivers: gpio: sifive: add missing PLIC header
Driver is using the PLIC API without including the right header.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
6252e8576c arch: riscv: irq_manage: add missing PLIC header
Module uses RISC-V PLIC interrupt controller API without including the
necessary headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
0addc80d10 arch: riscv: define local soc_interrupt_init prototypes
Instead of relying on messy soc.h files which are included via a fragile
chain of includes.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
c725c91d95 arch: riscv: define RISC_IRQ_MSOFT/MEXT
Instead of relying on spread definitions within SoC files.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
452a2f67cd arch: riscv: use CONFIG_RISCV_MCAUSE_EXCEPTION_MASK
Instead of custom SOC_MCAUSE_EXP_MASK definition. Note that SoCs
selecting RISCV_PRIVILEGED already used such config indirectly (see
changes in soc_common.h).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
ee60977958 arch: riscv: remove SOC from RISCV_SOC_MCAUSE_EXCEPTION_MASK
Just to stay consistent with other RISC-V related settings.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
6edb0624d8 soc: riscv: gd32vf103: simplify MCAUSE exception mask handling
The exception mask needs to cover MCAUSE bits 11:0, there's no need to
overengineer this setting using DT properties.

Ref. https://doc.nucleisys.com/nuclei_spec/isa/core_csr.html#mcause

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
a364420b30 soc: riscv: cleanup usage/definition of MCAUSE IRQ flag
The MCAUSE register has the "Interrupt" flag defined defined at XLEN-1
position (31 for 32-bit, 63 for 64-bit). This is not an SoC specific
option, and there's no need to expose it publicly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Gerard Marull-Paretas
fcbfe74df1 arch: riscv: define some RISC-V exception codes
As defined in Table 3.6 of "The RISC-V Instruction Set Manual, Volume
II: Privileged Architecture". Delete all spread definitions of the same,
weirdly prefixed with "SOC".

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-15 09:58:03 +01:00
Krzysztof Chruściński
f1ef55ec5a samples: shell: shell_module: Enable logging commands
Enabling commands for the sample. They were disabled by c0c8952739 but
should be enabled in the sample.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:57:54 +01:00
Krzysztof Chruściński
5062cef1f0 samples: logging: dictionary: Add support for runtime filtering
Extend sample with configuration which has shell on one UART and
UART dictionary based frontend on another. Shell commands can be used
to control runtime filtering of logging messages for the frontend and
shell backend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:57:54 +01:00
Krzysztof Chruściński
dc99da6a4f tests: logging: log_api: Extend to cover frontend runtime filtering
Extend test to cover runtime filtering for frontend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:57:54 +01:00
Krzysztof Chruściński
c9e2975a96 logging: log_cmds: Add support for frontend runtime filtering
Add support for controlling runtime filtering for frontend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:57:54 +01:00
Krzysztof Chruściński
b819b51fe7 logging: Add support for runtime filtering in frontend
So far frontend supported only compile time filtering. Adding
support for runtime filtering. From runtime filtering perspective
frontend is treated similar to any other backend but since
it is a singleton it has fixed ID.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:57:54 +01:00
Dmitrii Golovanov
68d1a52417 posix: sched: Implement get APIs for scheduling parameters
Initial implementation of `sched_getparam()` and `sched_getscheduler()`
POSIX APIs as a part of PSE53 `_POSIX_PRIORITY_SCHEDULING` option group.
Both functions are actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-01-15 09:57:44 +01:00
Dmitrii Golovanov
b184fc3a62 posix: sched: Add CONFIG_POSIX_PRIORITY_SCHEDULING
Add `CONFIG_POSIX_PRIORITY_SCHEDULING` Kconfig option to select
APIs from PSE53 `_POSIX_PRIORITY_SCHEDULING` option group.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-01-15 09:57:44 +01:00
Manuel Schappacher
bff6054cb8 net: gptp: Always use GM PRIO root system id for announce messages
A problem occurred while running PTP on a multi-port target
(RENESAS RZT2M) with two ports enabled. Announce messages on the
switched devices master port always contained local clock information
instead information from received on the slave port from the better
GM clock. Depending on the BMCA config this turned into having more
than one GM in the system.

Sending always the locally stored GM information helped to overcome
this issue.

Signed-off-by: Manuel Schappacher <manuel.schappacher@hs-offenburg.de>
2024-01-15 09:57:34 +01:00
Daniel Mangum
0a8d03b95f docs: posix: fix typo in description
Fixes a minor typo in description of the POSIX architecture.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-01-14 00:38:11 +01:00
Daniel Leung
5fc96ff9d7 sys: atomic_c: skip syscall tracing
This skips syscall tracing on atomic_c.h, as the compiler
does not like "({ ... tracing code ... })" and complains:

  error: expected identifier or '(' before '{' token

Even though there is already a '(' before '{'.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-13 06:02:18 -05:00
Anas Nashif
7fedc81666 ci: merged_pr stats: fix a bug an minor tweaks
We are not setting the review rule value correctly and default to 'no'
for all prs, even if they were correctly reviewed by assignees.

Minor other cleanups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-12 21:35:04 -05:00
Anas Nashif
0a50cb9179 ci: pr stats: define elasticsearch index as a repo variable
Add flexibility to change and modify index using a variable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-12 21:35:04 -05:00
Pisit Sawangvonganan
b4567fa551 drivers: serial: correct spelling
Employ a code spell checking tool to scan and correct spelling errors
in all files within the drivers/serial directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-13 00:24:36 +00:00
Pisit Sawangvonganan
6a50bbdb3a drivers: spi: correct spelling
Employ a code spell checking tool to scan and correct spelling errors
in all files within the drivers/spi directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-13 00:24:19 +00:00
Pisit Sawangvonganan
6a815d47e2 drivers: gpio: correct spelling
Employ a code spell checking tool to scan and correct spelling errors
in all files within the drivers/gpio directory.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-13 00:24:04 +00:00
Henrik Brix Andersen
fc694f39c4 dts: bindings: adc: nxp,vf610-adc: move binding to correct folder
Move the nxp,vf610-adc.yaml binding file to the correct folder.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-13 00:23:34 +00:00
Declan Snyder
43e34e95d4 MAINTAINERS: Add decsny as ETH/MDIO collaborator
Add myself (decsny) as ethernet/mdio collaborator.

I have taken an interest in ethernet and am currently
maintaining and writing some ethernet/mdio drivers for NXP,
and would like to use the collaborator role to monitor the
zephyr activity of the ethernet/mdio subsystems.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-01-13 00:23:07 +00:00
Lucas Tamborrino
4a7ba2fa94 samples: drivers: ipm: esp32: Add ESP32S3 support
Add support for ESP32S3 in the IPM sample.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Lucas Tamborrino
9f77808678 boards: xtensa: esp32_app_cpu: change bin name
Change bin name to esp32_appcpu_firmware instead of
esp32_net_firmware to keep naming coherence.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Lucas Tamborrino
11fc182315 soc: esp32: refactor esp32_net
SOC_ESP32_NET is now SOC_ESP32_APPCPU, following espressif's
naming convention in the same manner as ESP32S3 app cpu.

SOC_ESP32_APPCU is now a subset of SOC_SERIES_ESP32.

This commit also changes the necessary files, samples and tests
for bisect purposes.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-13 00:22:24 +00:00
Martin Kiepfer
38ed830f91 boards: m5stack_atoms3_lite: add support for M5Stack AtomS3 Lite
Add support for M5Stack AtomS3 Lite development board.

The AtomS3 Lite is a smaller version of the AtomS3 that
features only a StatusLED and no LCD display.

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-01-13 00:21:50 +00:00
Andrej Butok
a21076bbf3 doc: pyocd: Add CMSIS DAP Onboard Debug Probe support
Add the CMSIS DAP Onboard Debug Probes to the list
of supported probes by pyOCD.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-01-12 15:57:32 -05:00
Ajay Parida
fc959fce47 net: shell: Early wake up for TWT power save
Provision of configurable parameter for generating unblock event
ahead of TWT slot. Host application depending upon latencies can
configure this to wakeup rpu ahead of the TWT slot.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-01-12 15:56:56 -05:00
Rander Wang
e021ccfc74 drivers: dma: intel-adsp-hda: add delay to stop host dma
According to hardware spec, host dma needs some delay to completely stop.
In the bug the host dma is disabled in different path in a few microseonds.
The first setting disabled the host dma and called pm_device_runtime_put
to power off it. The second setting found the host dma was still alive
and calle pm_device_runtime_put again. This results to pm->usage
checking failed.

BugLink: https://github.com/thesofproject/sof/issues/8686
Signed-off-by: Rander Wang <rander.wang@intel.com>
2024-01-12 15:56:30 -05:00
Yves Vandervennet
3848fb82b8 boards: mimxrt1050_evk: enable linkserver support
- adds the definitions in the board.cmake file
 - updates documentation

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-01-12 15:40:53 -05:00
Pavel Vasilyev
27b1f4eb7f Bluetooth: Mesh: Fix dereferencing before null pointer check
Don't dereference pointer until it is checked on NULL.

Fixes: #66805
Coverity-CID: 338098

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-01-12 11:28:59 -06:00
Alberto Escolar Piedras
cee40d1d49 tests/drivers/uart/uart*: Allow on nrf52_bsim
Add the nrf52_bsim to the platform_allow list
for tests which had such a filter.

Note that for this test to pass, you need
to connect the uart in loopback, passing the command
line option `-uart0_loopback` to zephyr.exe

Note this tests do not run right now by default in CI
as the fixture is preventing it.
They can be run with:

twister -T tests/drivers/uart/ -v -p nrf52_bsim \
  --fixture gpio_loopback -- -uart0_loopback

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Alberto Escolar Piedras
cf54f9acf9 boards nrf52_bsim: Allow running uart tests in this board
Let's allow the uart tests to run in this board

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Alberto Escolar Piedras
f82f6cdeae tests uart/uart_async_api: Improve filter
These tests were filtering by CONFIG_UART_CONSOLE,
but that does not seem a strick requirement.
It seems the requirement would just be CONFIG_SERIAL,
but that is implicit if CONFIG_SERIAL_SUPPORT_ASYNC,
which is required for all these tests, so let's
just remove CONFIG_UART_CONSOLE.

(The simulated nrf5x boards do not set CONFIG_UART_CONSOLE
by default, as by default the console is routed to the
process stdout instead)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Alberto Escolar Piedras
7ef23e1573 tests uart/uart_pm: Fix kconfig warning
The option CONFIG_NATIVE_UART_0_ON_STDINOUT
is only usable for the native_sim/posix(_64) targets,
but this test is only allowed for the nrf52840dk_nrf52840.
Building with this option set causes a kconfig warning.
Let's just remove it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Alberto Escolar Piedras
51f9af86e4 tests/drivers uart_pm: Fix for too fast targets
On the async configurations, the first part of the test
(test_uart_pm_in_idle) can interfere with the second part
of the test, if the device has a fast enough CPU.
This is due to the first part of the test ending
as soon as it queues the last byte for transmission.
If the device is fast enough (and the simulated
nrf52 is), the 2nd part of the test will start executing
enabling the UART Rx, which can result in either
the Rx being enabled mid frame, which can result in a frame
error or even before the Tx HW started pushing the byte
in the line (resulting in that byte being received).
Neither of these cases are handled by the 2nd test,
which sees a spurious error or received byte
and fails.

Let's just add a small delay at the end of the first test
to allow the Tx of the last byte to be done.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00