diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21316c8a8..d3efd7337 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/docs/lab-1/guide/part-4.md b/docs/lab-1/guide/part-4.md index 3483ade27..7415a2c51 100644 --- a/docs/lab-1/guide/part-4.md +++ b/docs/lab-1/guide/part-4.md @@ -74,7 +74,7 @@ __interrupt: mv a0, sp csrr a1, scause csrr a2, stval - jal + jal handle_interrupt .globl __restore # 离开中断 @@ -124,4 +124,4 @@ __restore: sret ``` -这样的话我们就完成了对当前执行现场保存,我们把 `Context` 以及 `scause` 和 `stval` 作为参数传入了 `handle_interrupt` 函数中,这是一个 Rust 编写的函数,后面我们将会实现它。 \ No newline at end of file +这样的话我们就完成了对当前执行现场保存,我们把 `Context` 以及 `scause` 和 `stval` 作为参数传入了 `handle_interrupt` 函数中,这是一个 Rust 编写的函数,后面我们将会实现它。 diff --git a/docs/lab-1/guide/part-5.md b/docs/lab-1/guide/part-5.md index 6d0863367..93dfb7f34 100644 --- a/docs/lab-1/guide/part-5.md +++ b/docs/lab-1/guide/part-5.md @@ -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")); @@ -97,4 +97,4 @@ pub extern "C" fn rust_main() -> ! { Hello rCore-Tutorial! mod interrupt initialized panic: 'Interrupted: Exception(Breakpoint)' -``` \ No newline at end of file +```