提交 a8e95f9f 编写于 作者: Z Zihao Yu

riscv64,system: add S-mode priviledge instructions

上级 38812d0f
......@@ -43,6 +43,16 @@ make_EHelper(priv) {
raise_intr(11, cpu.pc);
print_asm("ecall");
break;
case 0x102:
sstatus->sie = sstatus->spie;
sstatus->spie = 1;
rtl_li(&s0, sepc->val);
rtl_jr(&s0);
print_asm("sret");
break;
case 0x120:
print_asm("sfence.vma");
break;
case 0x302:
mstatus->mie = mstatus->mpie;
mstatus->mpie = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册