Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix of lab1 guide part 4 && 5 #89

Open
wants to merge 3 commits into
base: rcore_tutorial_v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
run: cargo install cargo-binutils
- name: Install QEMU
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: sudo apt install qemu-utils
run: |
sudo apt update
sudo apt install qemu-utils
- name: Install QEMU
if: ${{ matrix.os == 'macos-latest' }}
run: brew install qemu
Expand Down
4 changes: 2 additions & 2 deletions docs/lab-1/guide/part-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ __interrupt:
mv a0, sp
csrr a1, scause
csrr a2, stval
jal
jal handle_interrupt

.globl __restore
# 离开中断
Expand Down Expand Up @@ -124,4 +124,4 @@ __restore:
sret
```

这样的话我们就完成了对当前执行现场保存,我们把 `Context` 以及 `scause` 和 `stval` 作为参数传入了 `handle_interrupt` 函数中,这是一个 Rust 编写的函数,后面我们将会实现它。
这样的话我们就完成了对当前执行现场保存,我们把 `Context` 以及 `scause` 和 `stval` 作为参数传入了 `handle_interrupt` 函数中,这是一个 Rust 编写的函数,后面我们将会实现它。
4 changes: 2 additions & 2 deletions docs/lab-1/guide/part-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% label %}os/src/interrupt/handler.rs{% endlabel %}
```rust
use super::context::Context;
use riscv::register::stvec;
use riscv::register::{scause::Scause, stvec};

global_asm!(include_str!("../asm/interrupt.asm"));

Expand Down Expand Up @@ -97,4 +97,4 @@ pub extern "C" fn rust_main() -> ! {
Hello rCore-Tutorial!
mod interrupt initialized
panic: 'Interrupted: Exception(Breakpoint)'
```
```