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

feat: use RustSBI 0.4.0 proc macros to simplify VCpu SBI implementation #8

Merged
merged 4 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ bit_field = "0.10"

riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] }
riscv-decode = { git = "https://github.com/KuangjuX/riscv-decode.git" }
sbi-spec = { version = "0.0.6", features = ["legacy"] }
sbi-rt = { version = "0.0.2", features = ["integer-impls", "legacy"] }
rustsbi = { version = "0.4.0", features = ["forward"] }
sbi-spec = { version = "0.0.7", features = ["legacy"] }
sbi-rt = { version = "0.0.3", features = ["integer-impls", "legacy"] }
tock-registers = "0.8.1"
memoffset = { version = ">=0.6.5", features = ["unstable_const"] }

Expand Down
3 changes: 1 addition & 2 deletions src/detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ struct TrapFrame {
// handle exceptions only rather than interrupts.
#[naked]
unsafe extern "C" fn on_detect_trap() -> ! {
asm!(
core::arch::naked_asm!(
hky1999 marked this conversation as resolved.
Show resolved Hide resolved
".p2align 2",
"addi sp, sp, -8*21",
"sd ra, 0*8(sp)",
Expand Down Expand Up @@ -205,6 +205,5 @@ unsafe extern "C" fn on_detect_trap() -> ! {
"addi sp, sp, 8*21",
"sret",
rust_detect_trap = sym rust_detect_trap,
options(noreturn),
)
}
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#![feature(doc_cfg)]
#![feature(naked_functions)]
#![feature(riscv_ext_intrinsics)]
#![feature(asm_const)]
#![doc = include_str!("../README.md")]

#[macro_use]
Expand All @@ -12,7 +11,6 @@ pub mod csrs;
mod detect;
mod percpu;
mod regs;
pub mod sbi;
mod vcpu;

pub use self::percpu::RISCVPerCpu;
Expand Down
35 changes: 0 additions & 35 deletions src/sbi/base.rs

This file was deleted.

11 changes: 0 additions & 11 deletions src/sbi/dbcn.rs

This file was deleted.

96 changes: 0 additions & 96 deletions src/sbi/mod.rs

This file was deleted.

35 changes: 0 additions & 35 deletions src/sbi/pmu.rs

This file was deleted.

45 changes: 0 additions & 45 deletions src/sbi/rfnc.rs

This file was deleted.

84 changes: 0 additions & 84 deletions src/sbi/srst.rs

This file was deleted.

Loading