merge bbl crate to kernel

master
WangRunji 6 years ago
parent d9bb072cbd
commit 442e1f4d0f

@ -1,6 +0,0 @@
[package]
name = "bbl"
version = "0.1.0"
authors = ["WangRunji <wangrunji0408@163.com>"]
[dependencies]

@ -1,4 +0,0 @@
#![no_std]
#![feature(asm)]
pub mod sbi;

5
kernel/Cargo.lock generated

@ -60,10 +60,6 @@ dependencies = [
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bbl"
version = "0.1.0"
[[package]]
name = "bcm2837"
version = "0.1.0"
@ -300,7 +296,6 @@ version = "0.2.0"
dependencies = [
"aarch64 2.2.2 (git+https://github.com/rcore-os/aarch64)",
"apic 0.1.0 (git+https://github.com/rcore-os/apic-rs)",
"bbl 0.1.0",
"bcm2837 0.1.0 (git+https://github.com/rcore-os/bcm2837)",
"bit-allocator 0.1.0",
"bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",

@ -67,7 +67,6 @@ pc-keyboard = "0.5"
[target.'cfg(any(target_arch = "riscv32", target_arch = "riscv64"))'.dependencies]
riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] }
bbl = { path = "../crate/bbl" }
[target.'cfg(target_arch = "aarch64")'.dependencies]
aarch64 = { git = "https://github.com/rcore-os/aarch64" }

@ -17,7 +17,7 @@ pub fn id() -> usize {
}
pub fn send_ipi(cpu_id: usize) {
bbl::sbi::send_ipi(1 << cpu_id);
super::sbi::send_ipi(1 << cpu_id);
}
pub unsafe fn has_started(cpu_id: usize) -> bool {
@ -37,5 +37,5 @@ pub fn halt() {
}
pub fn exit_in_qemu(error_code: u8) -> ! {
bbl::sbi::shutdown()
super::sbi::shutdown()
}

@ -160,7 +160,7 @@ fn try_process_drivers() -> bool {
fn ipi() {
debug!("IPI");
bbl::sbi::clear_ipi();
super::sbi::clear_ipi();
}
/*

@ -1,5 +1,5 @@
use core::fmt::{Write, Result, Arguments};
use bbl::sbi;
use super::sbi;
struct SerialPort;

@ -7,6 +7,8 @@ pub mod compiler_rt;
pub mod consts;
pub mod cpu;
pub mod syscall;
mod sbi;
use log::*;
#[no_mangle]

@ -1,5 +1,5 @@
use riscv::register::*;
use bbl::sbi;
use super::sbi;
use log::*;
/*

Loading…
Cancel
Save