Commit Graph

92584 Commits

Author SHA1 Message Date
Chaitanya Tata a9e282c285 hostap: Fix missing dependencies for PSA
Due to a bug in Kconfig, both legacy and PSA crypto were enabled
earlier, so, the dependencies for PSA were missed as they were provided
by legacy.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Vivekananda Uppunda c8d0e5f5fc hostap: Add channel set support
This set of changes introduces an API to set the channel when
the device is working in independent Monitor or TX injection mode

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Vivekananda Uppunda 5ffecde140 hostap: Add Packet filter support
This set of changes brings in packet filter API for Monitor and
promiscuous mode operation

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Vivekananda Uppunda 5a87ce5e10 hostap: Provide setting mode related changes to hostap module
This change provides mode setting API to hostap module.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Chaitanya Tata 8b16d8cffa hostap: Fix memory leak
The control interface is initialized on every interface add but only
de-initialized on WPA supplicant termination. This leaks all cleanups in
the control interface dei-init.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Joakim Andersson 103a8606d9 hostap: kconfig: Enable AES key type for AES block cipher support
Enable the PSA key type which enables AES block cipher support.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Joakim Andersson 465c59f947 hostap: Kconfig: Fix PSA dependency on random numbers
Fix PSA dependency on random number support.
Random number generated is wanted, instead of a specific PRNG algorithm.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Krishna T c99aac00c4 hostap: Switch to PSA Kconfig
We need to use PSA MbedTLS template to get entropy working.
Rather than having a single set of options which makes dependency
management tough, have a separate entry for PSA based MbedTLS which
is enabled by for NS variants only.

Also, don't use MbedTLS APIs for entropy, instead use the Zephyr APIs
that can work for both NS and S builds.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Jukka Rissanen 864af13666 Revert "hostap: Remove commented Kconfig options"
The following commits will re-introduce functionality that
the earlier commit removed, so revert the earlier commit.

This reverts commit 64423e269e.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-20 09:00:52 +01:00
Marcin Niestroj cdf6c455c6 boards: nucleo_g0b1re: add ST Morpho connector nexus node
Add a new GPIO nexus node for the ST Morpho connector in the board.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-20 08:58:08 +01:00
Marcin Niestroj 76829948a5 boards: nucleo_g071rb: add ST Morpho connector nexus node
Add a new GPIO nexus node for the ST Morpho connector in the board.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-20 08:58:08 +01:00
Marcin Niestroj ba37f6ac57 boards: nucleo_g070rb: add ST Morpho connector nexus node
Add a new GPIO nexus node for the ST Morpho connector in the board.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-03-20 08:58:08 +01:00
Hake Huang 80e222e834 boards: mimxrt1024_evk: add arduino_header support
add gpio support in board tags
add arduino_header support in dts

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-03-20 08:57:18 +01:00
Hake Huang 7ff94f3207 iboards: mimxrt1010_evk: add gpio support in tags
add gpio support in tags for mimxrt1010_evk

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-03-20 08:57:18 +01:00
Declan Snyder f69241ae6f boards: rd_rw612_bga: Indicate entropy support
Indicate support for entropy in the board yaml and doc.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-20 08:56:19 +01:00
Declan Snyder 42ff35dc05 dts: rw6xx: Add TRNG Entry
Add DT entry for TRNG on RW6XX

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-03-20 08:56:19 +01:00
Alberto Escolar Piedras f0750df3da nrf5_bsim cmake: Check that the simulator version is new enough
Add a cmake check to ensure the simulator is new enough and guide
users to update it and rebuild if it isn't,
so they get a better experience than by just getting a build or
runtime error.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-19 21:18:13 -05:00
Daniel Leung f7165395b4 xtensa: mpu: introduce CONFIG_XTENSA_MPU_ONLY_SOC_RANGES
This allows the SoC to have total control on what MPU ranges
to be programmed at boot. This overrides the generic ranges
in the architecture core code.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung 57d591700b xtensa: mpu: enable userspace support
This extends the Xtensa MPU to support userspace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung aa09b41f29 tests: kernel/userspace: skip other thread tests if needed
With memory domain enabled, all threads within the same domain
have access to each other threads' stacks, especially with
CONFIG_ARCH_MEM_DOMAIN_SYNCHRONOUS_API enabled (as it is
expected behavior). So update the conditions to skip both
tests to read and write to other threads' stacks.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung 2fc55f3938 tests: kernel/mem_protect/userspace: support for Xtensa MPU
Add support to test for Xtensa MPU.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung df350c7469 xtensa: add MPU support for kernel mode
This enables support for MPU on Xtensa. Currently this is
for kernel mode only.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung da584af9aa xtensa: move two kconfigs out of CPU_HAS_MMU block
Both CONFIG_XTENSA_SYSCALL_USE_HELPER and
CONFIG_XTENSA_INSECURE_USERSPACE are also applicable to MPU.
So move them out of the CPU_HAS_MMU block.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung b019dcb05e xtensa: userspace: use syscall to check if user context
For CPU without THREADPTR, we need an alternative way to figure
out if we are in user context. This extends the user context
check to do that via a brief syscall.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung 5db5e8e109 xtensa: userspace: fix incorrectly passed syscall frame pointer
Calling z_mrsh_* functions require 7 arguments where the 7th is
the stack frame. Only the first 6 arguments are passed by
registers where the 7th must be done via stack. However, this
is not being done and an incorrect argument was being passed to
the z_mrsh_* functions as stack frame pointer. An obvious issue
would be dumping of stack during kernel oops, as incorrect data
was being printed or crashes due to inaccessible memory. So fix
it by properly populating the stack with correct stack frame
pointer as outgoing argument for the caller of z_mrsh_*
functions.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Daniel Leung 857abb8276 xtensa: userspace: simplify syscall trampoline a bit
There is no need to do a call4 and jx. Simply do a callx4
is enough.

Also amended the now incorrect comment about how syscall
trampoline is set up. It is now a straight call4 instead of
the old 2x call4.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 22:17:34 -04:00
Aleksander Wasaznik 16ba4bd564 Bluetooth: CI: trigger bsim on testlib change
Some bsim tests have a dependency on testlib. Since testlib does not
have a stable API, it's a good idea to run the bsim tests.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-19 21:15:44 -05:00
Aleksander Wasaznik f82a86c21b Bluetooth: testlib: `bt_testlib_connect`: better error logs
Changes to logging:
 - Don't log "Connected" if there was an error.
 - Identify the relevant bt_conn object in log messages by its index.
 - Special case non-fatal errors:
  - Failure due to out of free conn object is INF.
 - Improve transparancy of error messages:
  - For errno, include the name of the API.
  - For HCI errors, include the common prefix of the symbols
    'BT_HCI_ERR_' so they are easier to look up.

This change includes some light refactoring to make the code more
understandable, but does not change any behavior.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-19 21:15:44 -05:00
Hake Huang decf714f7a twister: add linkserver support with hardwaremap
in hardwaremap the dev-id is used to select debug probe
and linkserver accept the --probe. so and this support

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-03-19 21:13:08 -05:00
Sebastian Głąb 7ffafd9b64 drivers: watchdog: wdt_nrfx.c: Fix error code value
Align driver implementation to the watchdog driver API.
https://docs.zephyrproject.org/latest/hardware/peripherals/watchdog.html

int wdt_disable(const struct device *dev)
shall return:
    0 – If successful.
    -EFAULT – If watchdog instance is not enabled.
    -EPERM – If watchdog can not be disabled directly by application code.
    -errno – In case of any other failure.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-03-19 18:00:24 -05:00
Anas Nashif 313d135cb2 twister: do not use non-existing architectures
Do not use non-existing architectures, we now have an enum in the
schema.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-19 18:28:06 -04:00
Anas Nashif 2ea9de65c7 ci: verify twister schema changes
Run twister tests when schema changes.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-19 18:28:06 -04:00
Jukka Rissanen 8f4ac0d4ab net: trickle: Rename interval function
The function inteval_timeout() was missing "r", the function
should be called interval_timeout()

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-03-19 15:20:14 -05:00
Daniel DeGrasse 81ec61c085 drivers: clock_control: clock_control_mcux_syscon: make clock IDs unique
Syscon clock driver previously used a sequence where clock IDs increased
sequentially. This had a few disadvantages:
- if a new SOC was introduced with more instances of a given IP, the
  clock ID could not be sequential with the remaining IDs
- chance of collisions between clock IDs was relatively high

To resolve this, define LPC clock IDs using a bitmask macro. Note that
the CTIMER clock IDs are used within SOC clock files to perform clock
init, and the macro requires that the clock ID expand to an integer
rather than a expression with bitshifts (hence why the macro is not used
for these IDs)

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-03-19 18:43:58 +00:00
Daniel Leung dadbe105f2 posix: tracing for custom thread abort func
POSIX has a custom implementation for thread abort
(z_impl_k_thread_abort)	which lacks the	tracing	function
calls as in the	generic	version. So add	them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 13:37:41 -05:00
Daniel Leung a951f96766 arm: cortex_m: tracing for custom thread abort func
ARM/Cortex-M has a custom implementation for thread abort
(z_impl_k_thread_abort) which lacks the tracing function
calls as in the generic version. So add them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 13:37:41 -05:00
Daniel Leung 58ef5fb78e tracing: segger-sysview: add missing thread abort enter/exit
Tracing with sysview is missing both
sys_port_trace_k_thread_abort_enter()/_exit() which exist on
other tracing backends. So add them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-03-19 13:37:41 -05:00
Lauren Murphy d0ae602cef tflite-micro: update README to pull optional module
tflite-micro is an optional module now, and needs to be
pulled for the sample to build.

Fixes #69942.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-03-19 14:31:15 -04:00
Alberto Escolar Piedras a4b0e8a706 twister tests: Let's use native_sim instead of native_posix
native_posix is being replaced with native_sim, let's
use native_sim instead in twister tests.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-19 13:15:48 -05:00
Alberto Escolar Piedras 6161207e30 tests/drivers/dma: Run on native_sim instead of native_posix
native_posix is being replaced with native_sim, let's
have this tests be run on native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-19 13:15:48 -05:00
Alberto Escolar Piedras 210c7c2f21 boards native_sim[64]: Claim support for dma
The native_sim boards support the DMA emulator just like
native_posix. The tag was just never added in the native_sim
twister yaml. Let's add it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-19 13:15:48 -05:00
Benjamin Cabé 107b335cce ci: doc-build: increase timeout for doc build jobs
With the introduction of the new runners, the time it takes to build the
documentation in CI has slowed down to the point that the job often times
out.

Applied a conservative 2x factor to the timeouts that were in place.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-03-19 17:43:33 +00:00
Reto Schneider c45026fc08 testsuite: ztest: Fix argument name
As per current definition of the Z_TEST macro, defined in
include/zephyr/ztest_test_new.h, the passed parameter is named
'fixture', not 'this'.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-03-19 17:53:30 +01:00
Glenn Andrews aeea1d10de Lib: SMF: Fix typo in documentation
Fixes a typo found by @bryceschober

Spell-checked the rest of the document and found no issues.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-03-19 11:45:27 -04:00
Aleksander Wasaznik 893f505477 sys: `atomic_builtin.h`: Add missing include
`atomic_builtin.h` uses `NULL`, which is defined in `stddef.h`.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-03-19 10:26:03 -05:00
Alberto Escolar Piedras ecf29a2f46 tests/bsim/bt l2cap/stress: Be more silent
This test was way too verbose (produced a log over 65000 lines
long).
Let's mute it a bit. If the test fails, developers
can raise the log level as needed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-03-19 10:25:07 -05:00
TaiJu Wu 638a47f804 MAINTAINERS: Add myself to kernel collaborator
Add myself to kernel as a collaborator

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2024-03-19 11:08:58 -04:00
Joakim Andersson 8858a024c0 ipc: Add thread name to mbox work queues
Add thread name to mbox work queues when thread names are enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@heimdallpower.com>
2024-03-19 15:01:16 +01:00
Tomasz Leman 81658e67e7 dts: xtensa: intel_adsp: Remove ALH nodes from ACE 2.0 LNL DTS
Remove the Audio Link Hub (ALH) nodes from the ACE 2.0 LNL DTS file.

This patch cleans up the Device Tree Source by removing the individual
ALH stream/FIFO nodes. The ALH hardware is not present in the ACE 2.0
architecture, and these nodes are therefore not applicable.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-03-19 14:54:29 +01:00
Tomasz Leman 4ea52bdd12 soc: xtensa: intel: Update power status bitfields for LNL
This patch updates the power status register bitfield definitions in the
power management header for the Intel ADSP ACE 2.0 LNL platform.

Modifications include:
- Adjusting the 'ioxpgs' field from 4 bits to 2 bits.
- Adding a 'rsvd11' field with 2 bits to reflect reserved space.
- Changing the 'mlpgs' field from 2 bits to 1 bit.
- Updating the 'rsvd14' field from 1 bit to 2 bits for alignment.

These changes ensure that the power status register bitfields match the
latest hardware specification for the ACE 2.0 LNL SoC, which is crucial
for accurate power domain status monitoring.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-03-19 14:54:29 +01:00