4
0
luojia65 4 жил өмнө
parent
commit
86ed59163c

+ 1 - 1
CHANGELOG.md

@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ## [Unreleased]
 
 ### Modified
-- Use '#[naked]' instread of global assembly in newer Rust version for RustSBI platforms
+- Use '#[naked]' instead of global assembly in newer Rust version for RustSBI platforms
 
 ## [0.1.0] - 2020-12-26
 RustSBI is adapted to SBI standard with implementation number 4.

+ 3 - 3
platform/qemu/src/main.rs

@@ -323,12 +323,12 @@ extern "C" fn start_trap_rust(trap_frame: &mut TrapFrame) {
     match cause {
         Trap::Exception(Exception::SupervisorEnvCall) => {
             let params = [trap_frame.a0, trap_frame.a1, trap_frame.a2, trap_frame.a3];
-            // 调用rust_sbi库的处理函数
+            // Call RustSBI procedure
             let ans = rustsbi::ecall(trap_frame.a7, trap_frame.a6, params);
-            // 把返回值送还给TrapFrame
+            // Return the return value to TrapFrame
             trap_frame.a0 = ans.error;
             trap_frame.a1 = ans.value;
-            // 跳过ecall指令
+            // Skip ecall instruction
             mepc::write(mepc::read().wrapping_add(4));
         }
         Trap::Interrupt(Interrupt::MachineSoft) => {