I've read riscv-privileged manual and known if an interrupt or exception happen, the current mode will be saved in xPP (x maybe M or S).
But I found it difficult to understand these xpp bits in xstatus. xPP records the previous mode, but where is the current mode stored?
Also, I think this manual is brief but lacking examples.. https://riscv.org/specifications/privileged-isa/
Is there a recommended extra manuals for learning?