|
@@ -73,6 +73,13 @@ fn rustsbi_impl_id() {
|
|
|
info: DummyEnvInfo,
|
|
|
};
|
|
|
assert_eq!(sbi.handle_ecall(0x10, 0x1, [0; 6]).value, 4);
|
|
|
+ assert_eq!(sbi.handle_ecall(0x535441, 0, [0; 6]), SbiRet::success(33));
|
|
|
+ assert_eq!(sbi.handle_ecall(0x53555350, 0, [0; 6]), SbiRet::success(34));
|
|
|
+ // assert_eq!(sbi.handle_ecall(0x54494D45, 0, [0; 6]), SbiRet::success(35));
|
|
|
+ assert_eq!(sbi.handle_ecall(0x10, 4, [0; 6]), SbiRet::success(36));
|
|
|
+ assert_eq!(sbi.handle_ecall(0x10, 5, [0; 6]), SbiRet::success(37));
|
|
|
+ assert_eq!(sbi.handle_ecall(0x10, 6, [0; 6]), SbiRet::success(38));
|
|
|
+
|
|
|
let sbi = AlternateName {
|
|
|
dbcn: DummyConsole,
|
|
|
cppc: DummyCppc,
|
|
@@ -298,7 +305,7 @@ struct DummySta;
|
|
|
|
|
|
impl rustsbi::Sta for DummySta {
|
|
|
fn set_shmem(&self, _: SharedPtr<[u8; 64]>, _: usize) -> SbiRet {
|
|
|
- unimplemented!()
|
|
|
+ SbiRet::success(33)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -306,7 +313,7 @@ struct DummySusp;
|
|
|
|
|
|
impl rustsbi::Susp for DummySusp {
|
|
|
fn system_suspend(&self, _: u32, _: usize, _: usize) -> SbiRet {
|
|
|
- unimplemented!()
|
|
|
+ SbiRet::success(34)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -314,7 +321,7 @@ struct DummyTimer;
|
|
|
|
|
|
impl rustsbi::Timer for DummyTimer {
|
|
|
fn set_timer(&self, _: u64) {
|
|
|
- unimplemented!()
|
|
|
+ todo!()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -322,14 +329,14 @@ struct DummyEnvInfo;
|
|
|
|
|
|
impl rustsbi::EnvInfo for DummyEnvInfo {
|
|
|
fn mvendorid(&self) -> usize {
|
|
|
- unimplemented!()
|
|
|
+ 36
|
|
|
}
|
|
|
|
|
|
fn marchid(&self) -> usize {
|
|
|
- unimplemented!()
|
|
|
+ 37
|
|
|
}
|
|
|
|
|
|
fn mimpid(&self) -> usize {
|
|
|
- unimplemented!()
|
|
|
+ 38
|
|
|
}
|
|
|
}
|