Home
last modified time | relevance | path

Searched hist:"69 a443d05a709cb527fc672cff51818eb7162fb4" (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/arch/riscv/kernel/
H A Dthread_arch.c69a443d05a709cb527fc672cff51818eb7162fb4 Wed Oct 04 05:54:51 UTC 2023 Alvin Chang <alvinga@andestech.com> core: riscv: Fix condition of is_from_user()

RISC-V defines that xPP(previous privilege mode) field of CSR status
indicates the previous privilege level prior to the trap. Since the
encoding of user mode is 0, we should compare the xPP field with 0 here
to know that the trap is from user mode.

Signed-off-by: Alvin Chang <alvinga@andestech.com>
Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>