Browse Source

crate: update sbi-spec to version 0.0.3

prepare for fix in rust-embedded/riscv
luojia65 2 years ago
parent
commit
f7fb03bde2
3 changed files with 5 additions and 4 deletions
  1. 1 0
      CHANGELOG.md
  2. 3 3
      Cargo.toml
  3. 1 1
      src/ecall/base.rs

+ 1 - 0
CHANGELOG.md

@@ -12,6 +12,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 - Feature `legacy` to gate SBI legacy extension
 - Expose `init_*` functions on instance based RustSBI implementation
 - LEGACY_CLEAR_IPI implemented
+- Use sbi-spec crate version 0.0.3
 
 ### Modified
 

+ 3 - 3
Cargo.toml

@@ -17,9 +17,9 @@ edition = "2021"
 
 [dependencies]
 riscv = { git = "https://github.com/rust-embedded/riscv", rev = "e38a68d" }
-# todo: change to a release version when the fix is released
-# riscv = "0.8"
-sbi-spec = "0.0.2"
+# todo: change to a release version when the fix is released (https://github.com/rust-embedded/riscv/pull/112)
+# riscv = "0.8.1"
+sbi-spec = "0.0.3"
 
 [features]
 default = []

+ 1 - 1
src/ecall/base.rs

@@ -8,7 +8,7 @@ pub(super) fn handle_ecall(function: usize, param0: usize) -> SbiRet {
     use sbi_spec::base::*;
 
     let value = match function {
-        GET_SPEC_VERSION => (SBI_SPEC_MAJOR << 24) | (SBI_SPEC_MINOR),
+        GET_SBI_SPEC_VERSION => (SBI_SPEC_MAJOR << 24) | (SBI_SPEC_MINOR),
         GET_SBI_IMPL_ID => IMPL_ID_RUSTSBI,
         GET_SBI_IMPL_VERSION => RUSTSBI_VERSION,
         PROBE_EXTENSION => {