We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在现有的处理中:
rustsbi-qemu/rustsbi-qemu/src/feature/transfer_trap.rs
Line 23 in 96704cf
SPP
if((r_sstatus() & SSTATUS_SPP) != 0){ panic("usertrap: not from user mode"); }
若按上述设置,那么将会触发panic,这对于debug来说颇具误导性...
比较合适的设置方法应该是根据现有的MPP来设置SPP:
// 设置中断位 if ctx.mstatus.mpp() == MPP::User { mstatus::set_spp(SPP::User); } else { mstatus::set_spp(SPP::Supervisor); } mstatus::set_mpp(MPP::Supervisor);
The text was updated successfully, but these errors were encountered:
感谢!这应该是一个实现中出现的错误,是需要修复的。我会等项目重构结束后注意这个问题
Sorry, something went wrong.
转发函数已经改了,但其实现在是直接把非法指令也代理掉了,没有做模拟
No branches or pull requests
在现有的处理中:
rustsbi-qemu/rustsbi-qemu/src/feature/transfer_trap.rs
Line 23 in 96704cf
仅仅设置
SPP
为S态似乎有些草率。比如在xv6中,若是在用户态触发了非法指令异常,那么在异常处理函数中会判断该异常是否来自于用户态:若按上述设置,那么将会触发panic,这对于debug来说颇具误导性...
比较合适的设置方法应该是根据现有的MPP来设置SPP:
The text was updated successfully, but these errors were encountered: