Unverified Commit 418c1053 authored by bors[bot]'s avatar bors[bot] Committed by GitHub
Browse files

Merge #88

88: Bug fix: sfence.vma - incorrect operand order r=Disasm a=DeathWish5

There is a bug about the operand order of `riscv::asm::sfence_vma(asid: usize, addr: usize)`. According to [riscv-isa-manual](https://github.com/riscv/riscv-isa-manual/blob/master/src/supervisor.tex#L1198

), the first operand should be `vaddr`, and the second be `asid`. But `riscv::asm::sfence_vma` generates assembly code in the reverse order. In fact, our rust-OS which using this instruction to flush TLB have been running into an error until we reverse the parameter order.
I propose a simple solution which leave the function parameter order unchanged. Maybe you guys will change it to be more consistent with the specification. Anyway, let's fix this bug.



Co-authored-by: default avatarDeathWish5 <zyr_ms@outlook.com>
parents be2927e2 508a4d09
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment