浏览代码

fix(prototyper): use `x0` instead of `in(reg) 0` in sfence.vma for full address space flush (#133)

Signed-off-by: LiuWeijun <m202472188@hust.edu.cn>
xiaobor123 5 天之前
父节点
当前提交
a0a5fbab5d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      prototyper/prototyper/src/sbi/rfence.rs

+ 1 - 1
prototyper/prototyper/src/sbi/rfence.rs

@@ -304,7 +304,7 @@ pub fn rfence_single_handler() {
                     || (ctx.size > TLB_FLUSH_LIMIT)
                 {
                     unsafe {
-                        asm!("sfence.vma {}, {}", in(reg) 0, in(reg) asid);
+                        asm!("sfence.vma x0, {}", in(reg) asid);
                     }
                 } else {
                     for offset in (0..ctx.size).step_by(PAGE_SIZE) {