Riscv vector state ctx - #7876
Conversation
@maroueneboubakri Note: I am able to resolve the CFG_WITH_VFP flag issue, however the implementation of thread has to be moved from thread.c to thread_arch.c as thread.c is common between RISCV and ARM. so I will make same changes to FP PR as well. Thanks. |
|
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
Introduce a clean assembly implementation for saving and restoring the floating-point register context into high-performance, pure assembly within riscv_vector.S. To optimize context switching performance recursive macros is used to unroll vector chunk operations (vl8r.v and vs8r.v). Signed-off-by: Dave Patel <dave.patel@riscstar.com>
Add RISC-V thread support for vector state management. Introduce thread helpers to enable, disable, save and restore vector state during thread context switches. Store the per-thread vector context in struct thread_ctx and use the architecture-specific save/restore routines provided by riscv_vector.S. Use the existing RISC-V CSR helpers to manipulate sstatus instead of open-coded CSR accesses, matching the existing OP-TEE coding style. Signed-off-by: Dave Patel <dave.patel@riscstar.com>
574b33f to
f88d39d
Compare
|
D/TA: os_test_shlib_init:16 os_test_global=2 |
|
TEE test application started over default TEE instance regression######################################################
|
|
What's that test? |
Its a context switch test, loading vectors registers do some vector operation, then get time using system call (context switch) and then check the vector registers after to compare with original value and vector registers are successfully restored post syscall. |
|
Thanks. Do you intend to upstream it? I guess the test could be added to one of our existing TAs. |
yes sure |
|
No description provided.