Home
last modified time | relevance | path

Searched hist:cd7384a0a94b2eba741a797f27974338b063f391 (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/arch/riscv/kernel/
H A Dthread_arch.ccd7384a0a94b2eba741a797f27974338b063f391 Wed Aug 14 16:05:12 UTC 2024 Alvin Chang <alvinga@andestech.com> core: riscv: Simplify SP setup in setup_unwind_user_mode()

The parameter "regs" is the stack pointer which is allocated to store
system call registers when calling thread_scall_handler(). Thus, we can
simply get the original stack pointer by "regs + 1" equation, and use it
to exit user mode.

The code is referenced from ARM's setup_unwind_user_mode().

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com>