fix sbi interface for RustSBI version 0.2.2, adapting to RISC-V SBI v1.0.0

This commit is contained in:
Yu Chen
2022-07-20 23:10:27 +08:00
parent 6872910283
commit 70ae28ab22
16 changed files with 16 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize {
let mut ret;
unsafe {
core::arch::asm!(
"li x16, 0",
"ecall",
inlateout("x10") arg0 => ret,
in("x11") arg1,