Home
last modified time | relevance | path

Searched hist:"9 f71579409e2fd708dd308fbefb649d4ab4ef54b" (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/arch/riscv/kernel/
H A Dthread_rv.S9f71579409e2fd708dd308fbefb649d4ab4ef54b Thu Sep 26 02:33:39 UTC 2024 Alvin Chang <alvinga@andestech.com> core: riscv: Ensure XSTATUS is restored before XIE

In previous implementation, we found some accidental interrupts during
entering user mode and resuming of thread. We fixed it by clearing
XSTATUS.XIE first, which is global interrupt enable bit, to ensure there
are no interrupts during those operations.

Now we found the better solution: restore XSTATUS before restoring XIE.
This can ensure the global interrupt bit in XSTATUS is cleared before we
restore the individual interrupt bits in XIE.

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