Skip to content

Commit

Permalink
build: remove sbi_spec from deps
Browse files Browse the repository at this point in the history
Signed-off-by: YdrMaster <[email protected]>
  • Loading branch information
YdrMaster committed Feb 10, 2024
1 parent e280c5f commit adbfe7d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Modified

- Use derive macro based RustSBI interface, with separate functions for legacy stdio
- Update sbi-testing to version 0.0.1
- Update rustsbi to version 0.4.0-alpha.1
- Update sbi-spec to version 0.0.7
- Update sbi-rt to version 0.0.3
- Update sbi-testing to version 0.0.1
- Use crate *fast-trap* version 0.0.1 in rustsbi-qemu for trap handling
- Use crate *rcore-console* version 0.0.0 in rustsbi-qemu and test-kernel for `print!` and `println!`
- Use crate *aclint* version 0.0.0 in rustsbi-qemu for aclint structs
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion rustsbi-qemu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ edition = "2021"

[dependencies]
rustsbi = { version = "0.4.0-alpha.1", features = ["machine"] }
sbi-spec = { version = "0.0.7", features = ["legacy"] }
riscv = "0.10.1"
spin = "0.9"
rcore-console = "0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion rustsbi-qemu/src/clint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::{
ptr::null_mut,
sync::atomic::{AtomicPtr, Ordering},
};
use rustsbi::{spec::binary::SbiRet, HartMask, Ipi, Timer};
use rustsbi::{HartMask, Ipi, SbiRet, Timer};

pub(crate) struct Clint;

Expand Down
5 changes: 1 addition & 4 deletions rustsbi-qemu/src/dbcn.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use crate::uart16550;
use core::ops::Range;
use rustsbi::{
spec::binary::{Physical, SbiRet},
Console,
};
use rustsbi::{Console, Physical, SbiRet};
use spin::Once;

pub(crate) struct DBCN(Range<usize>);
Expand Down
4 changes: 2 additions & 2 deletions rustsbi-qemu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ extern "C" fn fast_handler(
mie::write(mie::MSIE | mie::MTIE);
break boot(ctx, supervisor.start_addr, supervisor.opaque);
}
Err(sbi_spec::hsm::HART_STOP) => {
Err(rustsbi::spec::hsm::HART_STOP) => {
mie::write(mie::MSIE);
unsafe { riscv::asm::wfi() };
clint::clear_msip();
}
_ => match mcause::read().cause() {
// SBI call
T::Exception(E::SupervisorEnvCall) => {
use sbi_spec::{base, hsm, legacy};
use rustsbi::spec::{base, hsm, legacy};
let mut ret = unsafe { SBI.assume_init_mut() }.handle_ecall(
a7,
a6,
Expand Down
11 changes: 4 additions & 7 deletions rustsbi-qemu/src/qemu_test.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
use rustsbi::{
spec::{
binary::SbiRet,
srst::{
RESET_REASON_NO_REASON, RESET_REASON_SYSTEM_FAILURE, RESET_TYPE_COLD_REBOOT,
RESET_TYPE_SHUTDOWN, RESET_TYPE_WARM_REBOOT,
},
spec::srst::{
RESET_REASON_NO_REASON, RESET_REASON_SYSTEM_FAILURE, RESET_TYPE_COLD_REBOOT,
RESET_TYPE_SHUTDOWN, RESET_TYPE_WARM_REBOOT,
},
Reset,
Reset, SbiRet,
};
use sifive_test_device::SifiveTestDevice;
use spin::Once;
Expand Down

0 comments on commit adbfe7d

Please sign in to comment.