Commit graph

16700 commits

Author SHA1 Message Date
James Roy
e38cc894e3 drivers: counter: Fix incorrect error codes
Unimplemented interfaces should return
-ENOSYS instead of -ENOTSUP.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-03-26 08:54:58 +01:00
Khoa Nguyen
c8027298ed tests: drivers: dac: Add support test app DAC for RA4
Add support test app dac_api, dac_loopback for Renesas
ek_ra4l1, ek_ra4w1, ek_ra4m1

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-03-25 22:13:12 +01:00
Robert Budai
1489038f3b drivers: gpio: add max14917
MAX14917 is an eight high-side switch, specified to deliver up to 700mA
(min) continuous current per channel. The high-side switches have
on-resistance of 120mΩ (typ) at 25°C ambient temperature

Signed-off-by: Robert Budai <robert.budai@analog.com>
2025-03-25 22:13:01 +01:00
Fredrik Gihl
83b1422f9c drivers: sensor: tmp114: Support setting odr
Add support for setting the sample frequency via `attr_set` and the
output data rate from device tree source.

Signed-off-by: Fredrik Gihl <fgihl@hotmail.com>
2025-03-25 22:12:11 +01:00
Emil Gydesen
a15cc2d37c tests: Bluetooth: BAP: Make RX checks less strict
Modify stream_rx.c so that the calls to FAIL are guarded
by the newly added valid_rx_cnt.

This helps prevent timing issues, especially with
broadcast, where the first SDU(s) may be delayed from
the application, and thus may be missed/contain errors.
Now it will only treat missing or error SDUs as a FAIL
if we have received a valid SDU. All fails, will still be
logged. We now also log both valid and total count.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-25 08:43:44 +01:00
Yangbo Lu
1ecf5698f6 tests: arm: exclude i.mx95 m7 for some interrupt tests
i.MX95 M7 is using multi-level interrupts with custom
interrupt handling. So, arm_custom_interrupt and
arm_irq_vector_table tests should exclude it.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-03-25 05:59:30 +01:00
Seppo Takalo
c78081e5cf modem: modem_cellular: Configurable MTU for CMUX
Allow configuring MTU for CMUX.
Some AT manual and specification define this as a
frame size. Linux ldattach default to 127 bytes,
3GPP TS 27.010 defaults to 31.

We should limit our CMUX frames to a size that
remote end is capable of handling.
Linux silently drops oversized frames.

Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as
this was only limiting a buffer sizes, and resulted
CMUX frames to be capped to same value.
Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead.

Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to
CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now
only used as a Chat module. DLCI pipes use
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-24 19:33:07 +01:00
Michał Stasiak
1e97295622 tests: drivers: flash: extend support for nRF54L09 and nRF54L20
Added missing nodes, configurations and filters in
testcase.yaml.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-03-24 19:22:56 +01:00
Khoa Tran
e1b90bf3d9 tests: i2c: add support for i2c sci-b on Renesas RA boards
Add Renesas RA board support for i2c test use sci_b_i2c:
- tests/drivers/i2c/i2c_api

Example for i2c use sci_b_i2c:

west build -b ek_ra8m1 tests/drivers/i2c/i2c_api/ -p always \
 -DDTC_OVERLAY_FILE=boards/ek_ra8m1_sci_b_i2c.overlay \
 -DCONF_FILE="boards/ek_ra8m1_sci_b_i2c.conf"

Signed-off-by: Khoa Tran <khoa.tran.yj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2025-03-24 19:22:18 +01:00
Evgenii Kosenko
c8e28d15b8 bluetooth: tester: btp_gap: adds set rpa timeout cmd
Adds BTP_GAP_SET_RPA_TIMEOUT command to btp, it allows dynamically set
Resolvable Private Address timeout.

Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
2025-03-24 15:09:53 +01:00
Lyle Zhu
9b8297545a tests: Bluetooth: BR: Add test suite sdp_server
IUT works as a SDP Server. The peer device, SDP client, is a PC with
running `bumble` on it.

Define 10 SDP records. 8 normal SDP records. one SDP record with large
service name that cannot be discovered by peer since the data length
exceeds the MTU of SDP. And one SDP record with large service name
that can be discovered by peer but `continuation state` needs to be
involved.

By default, no SDP record will be registered.
Add shell command `register_sdp` to register specific SDP record.
Add shell command `register_sdp_all` to register all normal SDP
records.
Add shell command `register_sdp_large` to register SDP record with
large service name that cannot be discovered by peer.
Add shell command `register_sdp_large_valid` to register SDP record
with large service name that can be discovered by peer.

In the test suite, there two test cases,
Case 1, discover the IUT.
Case 2, connect to the IUT. And send serial SDP discovery requests.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-24 15:09:26 +01:00
Emil Gydesen
1a2ea57885 Bluetooth: Classic: Shell: Remove last use of ctx_shell
The Bluetooth Classic sdp_client was the last user
of the ctx_shell, which could easily be removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-24 12:14:42 +01:00
Benjamin Cabé
b2c2f905fb tests: lwm2m: add ignored vulnerabilities for CoAPthon3
CoAPthon3 is only used for testing, ignore PYSEC-2019-166.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-24 12:14:20 +01:00
Michał Stasiak
3f76006327 tests: drivers: counter: basic_api: Add nRF54L20 FLPR
Added common overlay for nRF54L20 cores.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-03-24 12:14:13 +01:00
Krzysztof Chruściński
8d13b6b65b tests: drivers: uart: async_api: Align test to gcov
When CONFIG_COVERAGE is enabled then performance is degraded.
In that case higher baudrates shall be avoided because CPU may
not have enough time to handle UART interrupts. Limit baudrate
to 115200 when CONFIG_COVERAGE=y.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-24 09:58:57 +01:00
Josh DeWitt
c05cfbf15e kernel/sched: Re-sort waitq on priority change
k_thread_priority_set() on a pended thread wasn't re-inserting into the
waitq, causing the incorrect thread to run based on priority. When using
the scalable waitq config, this can also break assumptions of the tree
and leave the owner of a waitq still being in the waitq tree, cycles in
the tree, or a crash.

Remove and re-add a thread to a waitq to ensure the waitq remains in
order and the tree's assumptions are not violated.

To illustrate the issue, consider 4 threads in decreasing priority
order: A, B, C, and D along with two mutexes, m0 and m1. This is
implemented in the new complex_inversion mutex_api test.
1. D locks m1
2. C locks m0
3. C pends on m1
4. B pends on m1
5. A pends on m0, boosts C's priority, now tree on m1 is not sorted
6. D unlocks m1, left-most thread on tree is B. When removing B from
   tree it cannot be found because it searches to the right of C due to
   C's boosted priority when the node is actually on the left. rb_remove
   silently fails.
7. B unlocks m1, left-most thread on tree is still B and it tries to
   unpend itself, resulting in a NULL pointer dereference on
   B->base.pended_on.

Signed-off-by: Josh DeWitt <josh.dewitt@garmin.com>
2025-03-24 07:58:36 +01:00
Tom Hughes
424b255dd7 test: posix: timers: Fix unused function warning
Building with clang warns:

tests/posix/timers/src/clock.c:37:20: error: unused function 'tv_to_ts'
[-Werror,-Wunused-function]
static inline void tv_to_ts(const struct timeval *tv, struct timespec *ts)
                   ^
tests/posix/timers/src/clock.c:51:16: error: unused function 'tp_eq'
[-Werror,-Wunused-function]
_decl_op(bool, tp_eq, ==);     /* a == b */
               ^
tests/posix/timers/src/clock.c:52:16: error: unused function 'tp_lt'
[-Werror,-Wunused-function]
_decl_op(bool, tp_lt, &lt;);      /* a &lt; b */
               ^
tests/posix/timers/src/clock.c:53:16: error: unused function 'tp_gt'
[-Werror,-Wunused-function]
_decl_op(bool, tp_gt, &gt;);      /* a &gt; b */
               ^
tests/posix/timers/src/clock.c:54:16: error: unused function 'tp_le'
[-Werror,-Wunused-function]
_decl_op(bool, tp_le, &lt;=);     /* a &lt;= b */

tests/posix/timers/src/clock.c:59:20: error: unused function
'tp_diff_in_range_ns' [-Werror,-Wunused-function]
static inline bool tp_diff_in_range_ns(const struct timespec *a,
                   ^                   const struct timespec *b,

tests/posix/timers/src/clock.c:49:20: error: unused function
'tp_diff_in_range_ns' [-Werror,-Wunused-function]
static inline bool tp_diff_in_range_ns(const struct timespec *a,
                   ^                   const struct timespec *b,

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-24 07:53:10 +01:00
Emil Gydesen
69b6679613 Bluetooth: tester: Fix name of btp_ascs_ase_found_ev
The event is a BAP event, and has been renamed to
btp_bap_ase_found_ev.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-23 13:19:51 +01:00
Tom Hughes
b4f8a7f711 tests: lib: cmsis_dsp: Fix -Wsometimes-uninitialized warning
Building libraries.cmsis_dsp.distance with clang warns:

tests/lib/cmsis_dsp/distance/src/f32.c:99:3: error: variable 'val' is
used uninitialized whenever switch default is taken
[-Werror,-Wsometimes-uninitialized]
                default:
                ^~~~~~~
tests/lib/cmsis_dsp/distance/src/f32.c:104:19: note: uninitialized use
occurs here
                output[index] = val;
                                ^~~
tests/lib/cmsis_dsp/distance/src/f32.c:57:16: note: initialize the
variable 'val' to silence this warning
                float32_t val;
                             ^
                              = 0.0

Not really necessary since there is a zassert_unreachable, but doesn't
hurt to initialize the variable.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-23 13:19:27 +01:00
Fin Maaß
7c11db9801 tests: drivers: mfd: add maxq10xx device
add maxq10xx mfd device to tests

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-03-23 13:18:44 +01:00
Anas Nashif
56f7dc4c2e scripts: make sure we do not install vulunerable python packages
Make sure we install packages with no issues, some of the issues being
reporting on packages we might install using pip:

Warn: Project is vulnerable to: PYSEC-2019-41 / GHSA-qfc5-mcwq-26q8
Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc
Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56
Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h
Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg
Warn: Project is vulnerable to: PYSEC-2017-74
Warn: Project is vulnerable to: GHSA-55x5-fj6c-h6m8
Warn: Project is vulnerable to: PYSEC-2014-9 / GHSA-57qw-cc2g-pv5p
Warn: Project is vulnerable to: PYSEC-2021-19 / GHSA-jq4v-f5q6-mjqq
Warn: Project is vulnerable to: GHSA-pgww-xf46-h92r
Warn: Project is vulnerable to: PYSEC-2022-230 / GHSA-wrxv-2j5q-m38w
Warn: Project is vulnerable to: PYSEC-2018-12 / GHSA-xp26-p53h-6h2p
Warn: Project is vulnerable to: PYSEC-2024-4 / GHSA-2mqj-m65w-jghx
Warn: Project is vulnerable to: PYSEC-2023-165 / GHSA-cwvm-v4w8-q58c
Warn: Project is vulnerable to: PYSEC-2022-42992 / GHSA-hcpj-qp55-gfph
Warn: Project is vulnerable to: PYSEC-2023-137 / GHSA-pr76-5cm5-w9cj
Warn: Project is vulnerable to: PYSEC-2023-161 / GHSA-wfm5-v35h-vwf4
Warn: Project is vulnerable to: GHSA-3f63-hfp8-52jq
Warn: Project is vulnerable to: GHSA-44wm-f244-xhp3
Warn: Project is vulnerable to: GHSA-56pw-mpj4-fxww
Warn: Project is vulnerable to: GHSA-j7hp-h8jx-5ppr
Warn: Project is vulnerable to: PYSEC-2023-175
Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h
Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6
Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf
Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc
Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f
Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm
Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52
Warn: Project is vulnerable to: GHSA-c6fm-rgw4-8q73

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-22 14:03:56 -04:00
Nikodem Kastelik
8b77098ca1 tests: drivers: spi: add test case for nRF54H20 SPIS120
New test case is for building an application simultaneously
utilizing SPIM120, SPIM120, SPIS120 and SPIS13x.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2025-03-22 13:38:34 +01:00
Declan Snyder
3a477c56dd tests: spi_loopback: Remove logging module
Since we are using ZTest, if we use the ZTest paradigm properly, we
don't need a logging module, since ZTest already logs what it does.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
6bcee13d9b tests: spi_loopback: Use ZTest properly
Instead of having a bunch of giant if conditions and just running
all the test cases from one actual ZTest case, convert all the test
cases into proper ZTest test cases.

Removing the returns is now required because otherwise there will be
compiler warnings, and they were never doing anything anyways in the
event of zassert fail. ZTest cases are meant to report pass or fail with
ztest paradigm, not with return values and log messages.

Also move the test of the spi lock/release to a separate test suite
since it is not really testing an actual bus transfer, but rather a
that a feature in the SPI API is respected.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
8b8765982a tests: spi_loopback: Standardize buffer defines
More boy scout rule, I noticed every single test case was using
different variations of C syntax to declare the buffers, this is
inconvenient to the reader, make a standard way to declare buffers used
for the test.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
b0197282f9 tests: spi_loopback: Create transceive ztest wrapper
There was a lot of copy paste of this code:

int ret;
ret = spi_transceive_dt(spec, &tx, &rx);
if (ret) {
       LOG_ERR("Code %d", ret);
       zassert_false(ret, "SPI transceive failed");
       return ret;
}

This is quite redundant and can be simplified.
Also, return is not needed because a failed zassert
will not continue to return anyways.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Declan Snyder
362218c900 tests: spi_loopback: Clean up file defines
Following the boy scout rule, since I am using this test a lot lately
and going to improve it, the first step will be to clean up the
structure of the file. The following changes are made:

- Remove unused #includes
- Condense some #if #else macro defines or make into single line, to
  simplify the readability of the preprocessor code
- Move definitions around so that related things are all next to
  each other, instead of randomly scattered around the file
- Create section header comments for broadly related things in the file
  to improve developer navigation experience
- Introduce macro for copy pasted print buf size calculation
- A few minor comment edits

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-03-21 14:41:02 -04:00
Lucas Tamborrino
c6f84d0ba2 boards: espressif: esp32c6: Add LP Core board support
Add ULP Coprocessor board support for C6.
This requires a change in the board qualifier depending on the build
target.
Update esp32c6 overlay and configuration files to the proper name.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-03-21 17:05:20 +01:00
Robert Lubos
a61287e876 net: lib: tls_credentials: Rename TLS_CREDENTIAL_SERVER_CERTIFICATE
TLS_CREDENTIAL_SERVER_CERTIFICATE credential type is misleading, as in
fact it just represents a public certificate, it does not matter if the
certificate belongs to a server or a client. And actually, it was
already used in-tree for clients as well, for example in LwM2M.

Therefore rename the credential type to a more generic
TLS_CREDENTIAL_PUBLIC_CERTIFICATE and deprecate the old one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-21 14:18:52 +01:00
The Nguyen
81470023f8 tests: drivers: display: add support for rtk7eka6m3b00001bu shield
add build support for display_read_write on rtk7eka6m3b00001bu shield

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2025-03-21 14:17:21 +01:00
Jukka Rissanen
7752def63d test: net: ipv6_fragment: Set link layer protocol type for a packet
The test_send_ipv6_fragment_without_hbho() test did not set link layer
protocol type for the packet. It is needed in this case because we
are sending a ready made packet and the protocol type is unknown
otherwise.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-21 09:52:42 +01:00
TOKITA Hiroshi
230280e0e9 boards: arduino: uno_r4: Add ADC, PWM, I2C, SPI, and TRNG
Add support for basic peripherals.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-21 09:51:47 +01:00
Mahesh Mahadevan
97f1fd832d tests: pm: Enable standby power mode support on NXP RW612 Boards
Enable PM mode 3 on NXP FRDM_RW612 and RD_RW612 boards.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2025-03-21 09:51:38 +01:00
Lyle Zhu
30c1ba17e3 test: Bluetooth: Classic: Rename SDP client test case
Change the test case name from `sdp.c` to ` bluetooth.classic.sdp.client`

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-21 06:31:40 +01:00
Tom Hughes
15411747e7 everywhere: Use correct macro for gcc-specific warnings
Many warnings were disabled for all compilers, even though they are
gcc-specific warnings. Now that clang has -Wunknown-warning-option
enabled, this can cause compilation failures when building with clang
toolchains.

Use TOOLCHAIN_DISABLE_GCC_WARNING for all gcc-specific macros.

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
https://clang.llvm.org/docs/DiagnosticsReference.html

Fixes: #84138

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-20 21:57:47 +01:00
Tom Hughes
11d70c61e5 everywhere: Replace diagnostic pragmas with TOOLCHAIN_* macros
The TOOLCHAIN_DISABLE_WARNING/TOOLCHAIN_ENABLE_WARNING macros are easier
to read and compiler agnostic.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-20 21:57:47 +01:00
Jukka Rissanen
4909faf705 tests: net: utils: Add tests for IP address string with mask
Add tests that will verify that IP address with an optional mask
string is properly parsed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-20 17:16:10 +01:00
Alberto Escolar Piedras
5295e10c26 tests/bsim/run_parallel: Fail if an explicitly listed test is missing
Instead of just printing a warning, fail (return != 0 to the shell)
if a test is missing, or a pattern does not match any test.

Also, warn (and return != 0) if no tests are found when SEARCH_PATH
is provided.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-20 17:15:27 +01:00
Alberto Escolar Piedras
865c881ed0 tests/bsim: UART: Do not attempt to run empty set of multidevice tests
We never got to add any multidevice tests to the UART driver tests.
So let's not try to run that empty set in CI.

(we have some multidevice UART tests for BT).

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-20 17:15:27 +01:00
Alberto Escolar Piedras
78e772660c tests/bsim/bluetooth: Fix BIS test for 54L15 an 5340
tests/bsim/bluetooth/ll/bis/tests_scripts/broadcast_iso.sh
was split in two in 872b19321f
but for the 54L15 and 5340 it was forgotten in the list of
tests to run.
Let's fix it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-20 17:15:27 +01:00
Krzysztof Chruściński
29bc28a09a tests: debug: cpu_load: Extend filtering with riscv
Allow test execution for riscv since it now supports cpu_load module.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-20 17:14:52 +01:00
Martin Hoff
eeb709927f tests: drivers: add overlay/testcase for silabs xg29_rb4412a board
Add some overlay files for the silabs xg29_rb4412a board to enable tests
on the board. Also add the platform to some testcase.yaml files.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2025-03-20 17:14:35 +01:00
Emil Gydesen
d19abff476 Bluetooth: CSIP: Add support for dynamically setting set size
The set size can now be dynamically set and notified.
The rank is added as a argument in the case that changing
the set size, also affects the device's rank, as ranks
in a coordinated set needs to be continuous.

The set coordinator implementation has been updated
to support receiving the new set size, and providing
this information to the upper layers.

This commit adds a babblesim test for the new API,
as well as a shell command.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-20 14:23:40 +01:00
Emil Gydesen
f783e54160 tests: Bluetooth: Tester: Add mutex for uart_send
Since tester_send_with_index may be called in different threads,
we need to guard the 2 calls to uart_send to avoid
sending partial btp message from 2 or more threads.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-20 14:23:02 +01:00
Maximilian Deubel
878ab53698 drivers: sensor: add Bosch BMM350 magnetometer driver
Add driver for Bosch BMM350 magnetometer sensor.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2025-03-20 12:17:41 +01:00
Sudan Landge
0161118913 tests: arch: arm: verify Armv8.1-M MPU PXN
Adds a test to verify Armv8.1-M MPU architecture's PXN attribute.

Verify PXN via static mpu config by utilizing existing __ramfunc MPU region
Since previous commit changes the behaviour of __ramfunc region,
executing userspace code in this region in privileged mode will
result in an MPU fault while execution in unprivileged mode should
work fine.

Verify PXN via DT by creating a custom section in the unused SRAM region.
Since the overlay sets the PXN attribute for the SRAM, executing code
in this region in privileged mode will result in an MPU fault while,
execution in unprivileged mode should work fine.
Also, instead of testing DT config for each board, do it only for MPS3
boards that which can be tested with simulation.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-03-20 12:17:11 +01:00
Sudan Landge
637bd8f587 arch: arm: Add PXN attr for userspace MPU regions
What is the change?
 - PXN attributes is set for static mpu regions such that
   __ramfunc and __ram_text_reloc having userspace code
   cannot be executed in privileged mode.
 - Updated the notable change section to inform about the change in
   behaviour of code executed from __ramfunc and __ram_text_reloc MPU
   regions.

Why do we need this change?
 - The current static MPU regions allows executing userspace/unprivileged
   code from privileged mode which may not be expected and can lead to
   secure privileged escalation attacks.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2025-03-20 12:17:11 +01:00
Josuah Demangeon
61a1cdf03f drivers: video: emul_imager: use a "PRIV" video CID
Use a video control ID in the private range rather than using an existing
CID, as the emulated imager does not effectively applies these properties
to the image feed and are just for API test purpose.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-03-20 07:20:55 +01:00
Josuah Demangeon
5c05fd5d2a drivers: video: api: do not wait the timeout
Fail immediately during tests rather than letting K_FOREVER trigger a CI
timeout.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-03-20 07:20:55 +01:00
Josuah Demangeon
a86da87a52 drivers: video: emul: store only one line of data
Only store a single line of the full frame. This allows to support a
large enough frame size to remove the Kconfig option, which simplifies
the implementation (fewer checks needed).

Signed-off-by: Josuah Demangeon <me@josuah.net>
2025-03-20 07:20:55 +01:00