This commit updates testcase.yaml and sample.yaml to use mps3/an547
identifier which replaces former mps3_an547 board name.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Different set of IRQ lines need to be used for this SoC and the CLOCK
IRQ is not to be installed in the vector table.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The place where TF-M places its non-secure api header files has changed
Therefore changing it for for all applications that use it.
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
This test does not define any syscall. It does not need to set
CONFIG_APPLICATION_DEFINE_SYSCALL.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
introduce global DSP_SHARING and CPU_HAS_DSP to be used by all
architectures and change existing usage in ARC to use those global
configs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some thread options were made architecture specific, i.e. K_ARC_DSP_IDX. We
have other architectures with similar functionality and we need to be
architecture agnostic at this level.
Changed the option to be more generic. The option is now called K_DSP_IDX.
Also remove multiple level of ifdefs and guards around those defines to
allow for documentation to be published and added a note about required
configs in the docstring.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The FMADD, FMSUB, FNMSUB and FNMADD instructions occupy major opcode
spaces of their own, separate from LOAD-FP/STORE-FP and OP-FP spaces.
Insert code to cover them.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Adds a new test for ARM Cortex-M architectures with the
CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER option enabled.
Signed-off-by: Corey Wharton <xodus7@cwharton.com>
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Renesas RA always uses interrupt handlers dynamically.
But this test requires static vector tables.
So, it needs to exclude platforms that use Renesas RA.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
The mr_canhubk3 board enables by default an off-chip watchdog that must
be serviced to avoid triggering a reset and cannot be disabled on a
per-test basis.
To add the needed ISR for this test involve doing modifications to the
LPSPI MCUX driver that does not worth the trouble for this test only,
so exclude this board.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This is the final step in making the `zephyr,memory-attr` property
actually useful.
The problem with the current implementation is that `zephyr,memory-attr`
is an enum type, this is making very difficult to use that to actually
describe the memory capabilities. The solution proposed in this PR is to
use the `zephyr,memory-attr` property as an OR-ed bitmask of memory
attributes.
With the change proposed in this PR it is possible in the DeviceTree to
mark the memory regions with a bitmask of attributes by using the
`zephyr,memory-attr` property. This property and the related memory
region can then be retrieved at run-time by leveraging a provided helper
library or the usual DT helpers.
The set of general attributes that can be specified in the property are
defined and explained in
`include/zephyr/dt-bindings/memory-attr/memory-attr.h` (the list can be
extended when needed).
For example, to mark a memory region in the DeviceTree as volatile,
non-cacheable, out-of-order:
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-attr = <( DT_MEM_VOLATILE |
DT_MEM_NON_CACHEABLE |
DT_MEM_OOO )>;
};
The `zephyr,memory-attr` property can also be used to set
architecture-specific custom attributes that can be interpreted at run
time. This is leveraged, among other things, to create MPU regions out
of DeviceTree defined memory regions on ARM, for example:
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-region = "NOCACHE_REGION";
zephyr,memory-attr = <( DT_ARM_MPU(ATTR_MPU_RAM_NOCACHE) )>;
};
See `include/zephyr/dt-bindings/memory-attr/memory-attr-mpu.h` to see
how an architecture can define its own special memory attributes (in
this case ARM MPU).
The property can also be used to set custom software-specific
attributes. For example we can think of marking a memory region as
available to be used for memory allocation (not yet implemented):
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-attr = <( DT_MEM_NON_CACHEABLE |
DT_MEM_SW_ALLOCATABLE )>;
};
Or maybe we can leverage the property to specify some alignment
requirements for the region:
mem: memory@10000000 {
compatible = "mmio-sram";
reg = <0x10000000 0x1000>;
zephyr,memory-attr = <( DT_MEM_CACHEABLE |
DT_MEM_SW_ALIGN(32) )>;
};
The conventional and recommended way to deal and manage with memory
regions marked with attributes is by using the provided `mem-attr`
helper library by enabling `CONFIG_MEM_ATTR` (or by using the usual DT
helpers).
When this option is enabled the list of memory regions and their
attributes are compiled in a user-accessible array and a set of
functions is made available that can be used to query, probe and act on
regions and attributes, see `include/zephyr/mem_mgmt/mem_attr.h`
Note that the `zephyr,memory-attr` property is only a descriptive
property of the capabilities of the associated memory region, but it
does not result in any actual setting for the memory to be set. The
user, code or subsystem willing to use this information to do some work
(for example creating an MPU region out of the property) must use either
the provided `mem-attr` library or the usual DeviceTree helpers to
perform the required work / setting.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit follows the parent commit work.
This commit introduces the following major changes.
1. Move all directories and files in 'include/zephyr/arch/arm/aarch32'
to the 'include/zephyr/arch/arm' directory.
2. Change the path string which is influenced by the changement 1.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
It doesn't make sense to keep the aarch32 directory in the
'arch/arm/core' directory as the aarch64 has been moved out.
This commit introduces the following major changes.
1. Move all directories and files in 'arch/arm/core/aarch32' to
'arch/arm/core' and remove the 'arch/arm/core/aarch32' directory.
2. Move all directories and files in 'arch/include/aarch32' to
'arch/include' and remove the 'arch/include/aarch32' directory.
3. Remove the nested including in the 'arch/include/kernel_arch_func.h'
and 'arch/include/offsets_short_arch.h' header files.
4. Change the path string which is influenced by the changement 1
and 2.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
The CMSIS module glue code was part of arch/ directory. Move it to
modules/cmsis, and provide a single entry point for it: cmsis_core.h.
This entry header will include the right CMSIS header (M or A/R).
To make this change possible, CMSIS module Kconfig/CMake are declared as
external, allowing us to add a new Zephyr include directory.
All files including CMSIS have been updated.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The profile type "not set" uses the "default crypto config" header.
However platform may set their own crypto configuration headers.
SHA-512 algorithm is not the most common algorithm to support and
are for example disabled in profile types medium and small.
Change to SHA-256 which is much more common and is even needed
internally by TF-M for protected storage and sub-key derivation.
Update the QEMU icount setting to make the interrupt occur during
the secure call to TF-M.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
- Add integration_platforms to avoid excessive filtering
- Make sure integration platforms are actually part of the filter
- Fix some tags and test meta data
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Testing NMI on emulated QEMU platforms brings some interesting and wrong
results like:
START - test_arm_runtime_nmi
Trigger NMI in 10s: 0 s
Trigger NMI in 10s: 1 s
Trigger NMI in 10s: 2 s
Trigger NMI in 10s: 3 s
Trigger NMI in 10s: 4 s
Trigger NMI in 10s: 5 s
Trigger NMI in 10s: 6 s
Trigger NMI in 10s: 7 s
Trigger NMI in 10s: 8 s
Trigger NMI in 10s: 9 s
NMI triggered (test_handler_isr)!
Assertion failed at ... arm_runtime_nmi_fn_test_arm_runtime_nmi:
(nmi_triggered is false)
Isr not triggered!
where the NMI handler is correctly called, see `NMI triggered`, but the
assert still fails on `nmi_triggered` being false.
This is due to a limitation in the emulation but also in the test not
being strictly architecturally compliant (you need a DSB;ISB sequence
after writing to SCB).
Add the proper barriers after writing to `SCB->ISCR` to make it
compliant and making it pass on QEMU as well.
Also reduce the timing to 2 sec.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
The current approach of failing the build on ztest with no optimization
broke coverage builds, and generally raised some concerns about being
too aggressive.
Downgrade the error to a warning and rework the option to inhibit the
warning, while also dropping it automatically for POSIX (that are not
really affected by stack size) and coverage run (that always runs with
no optimization).
Will reconsider this down the road if we still see issues filed for the
tests broken with no optimization and no further tuning.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Many tests are known to fail when built and no compiler optimizations.
Add a CMake check to error out when building a ztest based test with no
optimization, ask not file issues about it but also adds an opt-out
option to bypass the error for tests are actually designed to work in
this setup.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The page tables test checks to make sure the various page permissions are
set as expected, but when there's a malloc heap, things don't match the
test expectations. As this test doesn't require a heap, just disable it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
With picolibc moving to using the common malloc implementation, samples and
tests with picolibc-specific settings need to switch to using the common
malloc settings instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
rename the function that sets the handler for the nmi.
It should be namespaced and not camel-case:
z_NmiHandlerSet to z_arm_nmi_set_handler
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>