1Title: Test suite to verify the thread-swap (context-switch) and system-calls 2mechanisms (ARM Only) 3 4Description: 5 6Thread-swap test: 7 8This test verifies that the ARM thread context-switch mechanism 9behaves as expected. In particular, the test verifies that: 10- the callee-saved registers are saved and restored, properly, 11 at thread swap-out and swap-in, respectively 12- the floating-point callee-saved registers are saved and 13 restored, properly, at thread swap-out and swap-in, respectively, 14 when the thread is using the floating-point registers 15- the thread execution priority (BASEPRI) is saved and restored, 16 properly, at thread context-switch 17- the swap return value can be set and will be return, properly, 18 at thread swap-in 19- the mode variable (when building with support for either user 20 space or FP shared registers) is saved and restored properly. 21- the CPU registers are scrubbed after system call 22 23Notes: 24 The test verifies the correct behavior of the thread context-switch, 25 when it is triggered indirectly (by setting the PendSV interrupt 26 to pending state), as well as when the thread itself triggers its 27 swap-out (by calling arch_swap(.)). 28 29 The test is currently supported in ARM Cortex-M Baseline and Mainline 30 targets. 31 32Syscalls test: 33 34This test verifies that the ARM mechanism for user system calls 35behaves as expected. In particular, the test verifies that: 36- the mode variable with respect to the user mode flag always indicates 37 the mode in which a user thread is currently executing. 38- threads in system calls are using the privileged thread stack 39- stack pointer limit checking mechanism behaves as expected for 40 user threads in PRIV mode and supervisor threads 41 42The test is currently supported in ARM Cortex-M Baseline and Mainline 43targets with support for user space. 44 45--------------------------------------------------------------------------- 46 47Building and Running Project: 48 49This project outputs to the console. It can be built and executed on QEMU as 50follows: 51 52 ninja/make run 53 54--------------------------------------------------------------------------- 55 56Troubleshooting: 57 58Problems caused by out-dated project information can be addressed by 59issuing one of the following commands then rebuilding the project: 60 61 ninja/make clean # discard results of previous builds 62 # but keep existing configuration info 63or 64 ninja/make pristine # discard results of previous builds 65 # and restore pre-defined configuration info 66 67--------------------------------------------------------------------------- 68 69Sample Output: 70 71***** Booting Zephyr OS build zephyr-v1.14.0-1726-gb95a71960622 ***** 72Running test suite arm_thread_swap 73=================================================================== 74starting test - test_arm_thread_swap 75PASS - test_arm_thread_swap 76=================================================================== 77Test suite arm_thread_swap succeeded 78Running test suite arm_syscalls 79=================================================================== 80starting test - test_arm_syscalls 81Available IRQ line: 68 82USR Thread: IRQ Line: 68 83PASS - test_arm_syscalls 84=================================================================== 85Test suite arm_syscalls succeeded 86=================================================================== 87PROJECT EXECUTION SUCCESSFUL 88