mirror of
https://github.com/LearningOS/rust-based-os-comp2022.git
synced 2026-05-05 12:24:30 +08:00
fix sbi interface for RustSBI version 0.2.2, adapting to RISC-V SBI v1.0.0
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user