Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: illegal instruction delegate context switch error
Fix context switch error when delegate illegal instruction to S-Mode. 1. Sepc should be assigned the value of mepc, 2. Assign mstatus::MPP to sstatus::SPP to make sure kernel can know the correct privilege level before trap. 3. mstatus::MPP update to S-Mode to make sure back to S-Mode when mret to let kernel handle the exception. Signed-off-by: tfx2001 <tfx2001@outlook.com>
- Loading branch information