libutee: riscv: Fix the arguments of __utee_panic() for unwindingTo unwind stack from synchronous panic, the ra and s0(fp) registersshould be saved onto stack, and the a1 should be assigned as sp.
libutee: riscv: Fix the arguments of __utee_panic() for unwindingTo unwind stack from synchronous panic, the ra and s0(fp) registersshould be saved onto stack, and the a1 should be assigned as sp.The save_panic_regs_rv_ta() can handle these registers for abort usage.Signed-off-by: Alvin Chang <alvinga@andestech.com>Tested-by: Marouene Boubakri <marouene.boubakri@nxp.com>Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
libutee: riscv: Fix relocation type of function call into __utee_panic()In RISC-V, "j" instruction has R_RISCV_JAL relocation that can representan even signed 21-bit offset (+-1MiB). However, this
libutee: riscv: Fix relocation type of function call into __utee_panic()In RISC-V, "j" instruction has R_RISCV_JAL relocation that can representan even signed 21-bit offset (+-1MiB). However, this range is not enoughto be position independent code, and the linker generates linking error.Fix it by using "tail" instruction which has R_RISCV_CALL_PLT relocationthat the execution can jump to +-2GB location.Note that we won't return from _utee_panic(), that's why we use "tail"instead of "call" instruction so that we won't generate redundant returninstruction.Signed-off-by: Alvin Chang <alvinga@andestech.com>Acked-by: liushiwei <liushiwei@eswincomputing.com>
libutee: riscv: modify the UTEE_SYSCALL assemblyUse li instead of mv in UTEE_SYSCALL, store the num_argsin the t1 register. This works on RV32 and RV64,so change the compile control and rename th
libutee: riscv: modify the UTEE_SYSCALL assemblyUse li instead of mv in UTEE_SYSCALL, store the num_argsin the t1 register. This works on RV32 and RV64,so change the compile control and rename the file.Signed-off-by: liushiwei <liushiwei@eswincomputing.com>Acked-by: Jerome Forissier <jerome.forissier@linaro.org>Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
libutee: support RISC-V syscallAdd 64-bit RISC-V TA system call function.Modify the utee_syscalls_asm.S file to be generic.Signed-off-by: liushiwei <liushiwei@eswincomputing.com>Reviewed-by: ch
libutee: support RISC-V syscallAdd 64-bit RISC-V TA system call function.Modify the utee_syscalls_asm.S file to be generic.Signed-off-by: liushiwei <liushiwei@eswincomputing.com>Reviewed-by: chenchaokai <chenchaokai@eswincomputing.com>Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>