Browse Source

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 days ago
parent
commit
a0a5fbab5d
1 changed files with 1 additions and 1 deletions
  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) {