sbi spec uses a6, a7 as sbicall id, so we need to set a6 to 0
This commit is contained in:
parent
ab99bc8c28
commit
0fcea5a05b
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize {
|
||||||
let mut ret;
|
let mut ret;
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!(
|
asm!(
|
||||||
|
"li x16, 0",
|
||||||
"ecall",
|
"ecall",
|
||||||
inlateout("x10") arg0 => ret,
|
inlateout("x10") arg0 => ret,
|
||||||
in("x11") arg1,
|
in("x11") arg1,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue