Commit graph

274 commits

Author SHA1 Message Date
Vaishnav Achath cb953a4255 soc: arm: ti_simplelink: Add support for TI CC13X2X7 SoC series
Product URL: https://www.ti.com/product/CC1352P7
Datasheet : https://www.ti.com/lit/ds/symlink/cc1352p7.pdf

Features:

Powerful 48-MHz Arm® Cortex®-M4F processor
* 704KB flash program memory
* 256KB of ROM for protocols and library functions
* 8KB of cache SRAM
* 144KB of ultra-low leakage SRAM with parity for
high-reliability operation
* Dual-band Sub-1 GHz and 2.4 GHz operation

Updates:
* Remove CC1352P7_LaunchXL due to compliance checks
* Add CC1352P7 updates
* Update hal_ti for CC1352P7 support
* Remove blank line at end of modules/Kconfig.simplelink
* Split struct and typedef for pinctrl_soc_pin/pinctrl_soc_pin_t
* Reference cc13x2_cc26x2/pinctrl_soc.h
* Reference cc13x2_cc26x2/soc.h

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
2023-03-21 16:03:43 -04:00
Kumar Gala 8b24346bff tests: arch: x86: static_idt: Fix test when building with llvm
llvm will generate a different div instruction than gcc does and than
the number of types that the div instruction opcode takes is not 2.

Move to using inline asm with a idivl instruction to ensure the opcode
size is what we expect so that exc_divide_error_handler() can properly
skip over the instruction.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2023-02-19 20:47:23 -05:00
Anas Nashif 9ec20f82e4 tests: move arm_mpu_regions into tests/arch/
This is an architecture specific test, move it under tests/arch and fix
identifier.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-02-06 10:06:10 +01:00
Nicolas Pitre 373f8acaa7 tests: riscv: test FPU sharing access behavior
The RISC-V FPU context switching code is intricate and sometimes subtle.
Here's a test that exercizes various code paths to ensure they work as
intended, and to confirm that the target hardware does behave as
expected too.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2023-01-30 23:47:36 +00:00
Keith Packard 77554a09bb tests/x86/pagetables: Check pinned memory flags
Add another clause in the test_ram_perms code to verify that any pinned
regions have the correct flags.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-01-30 23:46:55 +00:00
Jordan Yates 839ca44f80 Revert "tests: update expected exception codes"
This reverts commit d8ac658578.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-01-27 18:09:32 +09:00
Jordan Yates d8ac658578 tests: update expected exception codes
Update expected exception codes for Cortex-M, Cortex-R and Cortex-A
CPUs.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-01-12 10:01:05 +01:00
Fabio Baltieri f5b4acac57 yamllint: indentation: fix files in tests/
Fix the YAML files indentation for files in tests/.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 14:23:53 +01:00
Fabio Baltieri 7db1d17ee3 yamllint: fix all yamllint line-length errors
Fix all line-length errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(line-length)'

Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Fabio Baltieri 5c32300861 yamllint: fix all yamllint truthy errors
Fix all thruthy errors detected by yamllint:

yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
  grep '(truthy)'

This only accepts true/false for boolean properties. Seems like python
takes all sort of formats:

https://github.com/yaml/pyyaml/blob/master/lib/yaml/constructor.py#L224-L235

But the current specs only mention "true" or "false"

https://yaml.org/spec/1.2.2/#10212-boolean

Which is the standard yamllint config.

Excluding codeconv and workflow files, as some are using yes/no instead
in the respective documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 01:16:45 +09:00
Siyuan Cheng 5854670b98 DSP: add dsp unit test
add dsp context switch test
add complex multiplication test for ARC processor

Signed-off-by: Siyuan Cheng <siyuanc@synopsys.com>
2022-12-19 11:56:55 +01:00
Anas Nashif ba7d730e9b tests/samples: use integration_plaforms in more tests/samples
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-29 16:03:23 +01:00
Anas Nashif 808266a493 tests: use ignore_fault field instead of tags
Use dedicated field in the yaml file instead of mixing this testing
feature with tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-25 06:38:05 -05:00
Keith Packard 661ff0527f tests/x86: Check libc partition in page permissions test
Picolibc uses the libc partition for some variables, so make sure
the test allows references to that data.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-11-08 10:44:36 +01:00
Keith Packard 56f0173b86 tests/arm_ramfunc: Disable picolibc heap for this test
This leaves an MPU partition free for this test

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-11-08 10:44:36 +01:00
Kumar Gala cea495fb45 tests: arch: common: timing: Convert CONFIG_MP_NUM_CPUS handling
Move runtime checks to use arch_num_cpus() and build checks
to use CONFIG_MP_MAX_NUM_CPUS.  This is to allow runtime
determination of the number of CPUs in the future.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-27 14:43:55 -04:00
Kumar Gala fc95ec98dd smp: Convert #if to use CONFIG_MP_MAX_NUM_CPUS
Convert CONFIG_MP_NUM_CPUS to CONFIG_MP_MAX_NUM_CPUS as we work on
phasing out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Kumar Gala 4f0166088c tests: move to using CONFIG_MP_MAX_NUM_CPUS
For tests that set CONFIG_MP_NUM_CPUS, switch to using
CONFIG_MP_MAX_NUM_CPUS instead as we work to phase out
CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-20 22:04:10 +09:00
Kevin Townsend 07de2ffbb0 tests: arch: arm: Fix thread swap test clobbering
The thread swap test was making use of a register to point to
ztest_thread_callee_saved_regs_container, which was being clobbered
in the inline assembly code, causing a hard-fault in certain cases.

This commit adds a clobber list of the registers used, causing the
compiler to assign ztest_thread_callee_saved_regs_container to an
appropriate (unclobbered) register.

It also addresses an issue in the v6-m and v8-m.baseline inline
assembler where only 4 of the 8 callee-saved registers were being
set from ztest_thread_callee_saved_regs_container, due to a double
use of `ldmia` on the same four registers. Since v6-m devices can't
operate outside r0-r7 on most instructions, the upper 4 callee-saved
registers are set first with `ldmia`, before setting the lower 4.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-10-20 20:04:48 +09:00
Anas Nashif 6a6a63d5fe tests: arch/timing: cleanup test configuraton
No need for two scenarios just to add a kconfig that works for all
platforms (smp and non-smp).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-26 16:49:58 +00:00
Gerson Fernando Budke b5f65f201d boards: arm: stm32l562e_dk_ns: Add flash partitions
The current stm32l562_dk_ns has no flash partitions defined. This add
flash partitions following partition sizes that are compatible with
the TF-M platform defined at flash_layout.h and removes the redundant
overlays board files.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-09-09 16:40:20 +00:00
Huifeng Zhang b1bfb175b5 tests: arm_smc_call: introduce arm smc call test
Add a simple test case to test the arm SMC call

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2022-09-09 16:36:37 +00:00
Michał Barnaś dae8efa692 ztest: remove the obsolete NULL appended to zassert macros
This commit removes the usage of NULL parameter as message in
zassert_* macros after making it optional

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-09-09 07:05:38 -04:00
Andrzej Głąbek 326f7bd450 tests: Increase stack size when nRF DK serial workaround is enabled
... and tests are built with no optimizations. The standard size may
not be sufficient in such circumstances.

Commit 4b1103547c addressed the same
issue in a single test and used a higher value (1024) that turns out
to be not necessary, so revert also that change to make the cleanup
easier when the workaround will no longer be needed.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-09-06 12:36:40 +02:00
Gerard Marull-Paretas 79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Gerard Marull-Paretas 082043c6e8 drivers: display: intel_multibootfb: convert to DT
Convert the device to be Devicetree based. Adjusted tests and other
areas that were using old Kconfig properties.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-02 14:16:08 +02:00
Gerard Marull-Paretas 11860face3 drivers: display: framebuffer: rework to make it self-contained
The "framebuf" driver was an incomplete driver expecting _clients_ to
implement missing functionality (i.e. init and device definition)
outside of the driver. This pattern of scattering driver code throughout
the tree is not common (if used at all). If certain drivers share
functionality, one can create a common module within the subsystem (see
e.g. ILI9XXX drivers).

The _generic_ framebuffer code was only used to implement the Intel
Multiboot framebuffer driver. This patch centralizes all the scattered
code in the subsystem and adjusts the driver name to "intel_multibootfb"
to make things clear. If there's ever another framebuffer driver that
shares code, it can be split into multiple modules.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-02 14:16:08 +02:00
Ederson de Souza 2431ae6bc4 tests/arch/common: Add tests for the arch timing API
Simple tests to check the sanity of implementations. As with any tests
involving time, a constant "tolerance" of 10% is used in some of the
measurements.

Checks are basically answering the questions 1) "is time always
increasing?" and 2) "at a somewhat constant pace?". And some tests for
the time conversion, answering "is the elapsed time in nanoseconds
somewhat coherent?".

As timing and emulation are a somewhat dangerous combination,
`testcase.yaml` exclude CONFIG_QEMU_TARGET=y from tests.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-08-29 16:09:50 -04:00
Gerard Marull-Paretas a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Krzysztof Chruscinski 4b1103547c tests: arch: arm: arm_interrupt: Increase stack size
Increase stack size for test thread. With no optimization
default stack size may not be enough.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-08-11 12:15:11 +02:00
Stephanos Ioannidis 5ceda9fe7d tests: arch: arm_hardfault_validation: Enable assert test mode
This commit enables the assert test mode (`CONFIG_ASSERT_TEST`) for the
ARM interrupt test because it relies on the assert function to return
without aborting in the "Assert occurring inside kernel panic" test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-10 14:32:36 +02:00
Stephanos Ioannidis b1fe54d9f0 tests: arch: arm_interrupt: Enable assert test mode
This commit enables the assert test mode (`CONFIG_ASSERT_TEST`) for the
ARM interrupt test because it relies on the assert function to return
without aborting in the in-ISR "Intentional assert" test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-08-10 14:32:36 +02:00
Joakim Andersson fcb9813128 tests: arm: Increase main stack size with no optimizations
If the test is run with the config NO_OPTIMIZATIONS enabled then the
stack size usage increases by around 80% for ARM platforms.
Increase the stack size used in test cases that enables building with no
optimizations for ARM.

Update description on TEST_ARM_CORTEX_M since it was outdated and said
it was only used for a single purpose.

Fixes: #47930
Fixes: #47929
Fixes: #47855

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2022-08-08 11:17:01 -04:00
Fabio Baltieri def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Kumar Gala b7fd26c141 tests: x86: Convert to test to use use DEVICE_DT_GET_ONE
Update test to use DEVICE_DT_GET_ONE to remove usage of
device_get_binding.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 17:19:13 -05:00
Johann Fischer d66e047e5b tests: use unsigned int for irq_lock()
irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-07-14 14:37:13 -05:00
Shaoan Li d7541defbe tests: arch: arm: move test arm_irq_advanced_features to new ztest API
Migrate the testsuite tests/arch/arm/arm_irq_advanced_features to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-14 10:29:00 +02:00
Shaoan Li e3d084ccb2 tests: arch: fix arm_thread_swap on stm32 platform
The test fails on several stm32 platforms, due to the
correlation between test_arm_syscalls and
test_arm_thread_swap, so disable the corresponding IRQ
interrupt may fix it.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-13 21:23:08 +02:00
Ederson de Souza 63a497280f test/arch: Remove xtensa_asm2 test
This test has been bitrotting for a while - years, in fact. As it didn't
have a `testcase.yaml`, it wasn't being run on twister. The code expects
to be run on single thread environment, but xtensa arch currently
doesn't support that.

This patch simply removes this test - if it's deemed important, it can
be reworked and readded in the future.

Fixes #47508.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-07-12 18:42:40 -04:00
Enjia Mai 06ab4d1912 tests: arch: x86: move the direct interrupt test to new ztest API
Migrate the testsuite tests/arch/direct_isr to the new ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-12 13:21:47 -04:00
Enjia Mai b3d442ec87 tests: kernel: move the direct interrupt test to arch testing
Move the direct interrupt test to tests/arch/x86/direct_isr. Two
reasons:
1. The direct interrupt is only for x86. It's arch-specific.
2. And it need extra gcc option to pass the build, that will
include testsuite number. Although it seems like we add a
extra testsuite for it, actually we can reduce whole tests
configuration in tests/kernel/interrupt. And also make this
test more generic as it used to be.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-07-12 13:21:47 -04:00
Alexandre Bourdiol 2d3c2efebd tests: arch: arm: arm-irq-vector-table: define _vector_end
Following implementation of commit 219d5b5,
and to complement commit 8c4f98d
it is also necessary define _vector_end in
test specific arm-irq-vector-table.ld

Fixes #47273

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-11 09:23:05 +00:00
Shaoan Li f6322eb19f tests: arch: arm: move test arm_thread_swap_tz to new ztest API
Migrate the testsuite tests/arch/arm/arm_thread_swap_tz to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-08 10:53:27 +02:00
Shaoan Li bfd59b17a1 tests: arch: arm: move test arm_thread_swap to new ztest API
Migrate the testsuite tests/arch/arm/arm_thread_swap to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-08 10:18:13 +02:00
Shaoan Li 432ae192df tests: arch: arm: move test arm_mem_protect to new ztest API
Migrate the testsuite tests/arch/arm/arm_mem_protect to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-08 10:17:58 +02:00
Kevin Townsend 9e4af9801a tests: arch: arm: Disable l552ze in arm.swap.tz
Disabling nucleo_l552ze_q_ns from the test suite since there isn't
enough room to sign the image with the toolchain used in CI. This can
be reverted if changes are made to the nucleo_l552ze_q_ns platform to
enable enough room for the signing data.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2022-07-07 15:11:38 +02:00
Shaoan Li 54d44ee0d6 tests: arch: arm: move test arm_hardfault_validation to new ztest API
Migrate the testsuite tests/arch/arm/arm_hardfault_validation to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-06 16:53:01 -05:00
Carlo Caione b87a51b438 tests: arm64_high_addresses: Rework and move to new ztest API
Rework and migrate the test to the new ztest API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-06 10:00:34 +00:00
Carlo Caione 8ada5b38c4 tests: arm64_gicv3_its: Move to new ztest API
Migrate the test to the new ztest API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-06 10:00:34 +00:00
Carlo Caione 3a303498b4 tests: arm64_psci: Move to new ztest API
Migrate the test to the new ztest API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-06 10:00:34 +00:00