remove once crate. fix bitvec crate commit id.

toolchain_update
WangRunji 6 years ago
parent 2f6f8ef9bc
commit 54de0d8ae7

9
kernel/Cargo.lock generated

@ -85,7 +85,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitvec"
version = "0.11.0"
source = "git+https://github.com/myrrlyn/bitvec.git#ed2aec38bfb5b1116e3585b1574c50655b9c85ec"
source = "git+https://github.com/myrrlyn/bitvec.git#8ab20a3e33fe068fc3a4a05eda1211d5fcc1237b"
[[package]]
name = "bootloader"
@ -248,11 +248,6 @@ name = "nodrop"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "once"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "os_bootinfo"
version = "0.2.1"
@ -381,7 +376,6 @@ dependencies = [
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"mips 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"once 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"pc-keyboard 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pci 0.0.1 (git+https://github.com/rcore-os/pci-rs)",
@ -689,7 +683,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum managed 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fdcec5e97041c7f0f1c5b7d93f12e57293c831c646f4cc7a5db59460c7ea8de6"
"checksum mips 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4cbf449a63e4db77af9f662d6b42068c0925e779a3a7c70ad02f191cf1e6c802"
"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
"checksum once 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "931fb7a4cf34610cf6cbe58d52a8ca5ef4c726d4e2e178abd0dc13a6551c6d73"
"checksum os_bootinfo 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "66481dbeb5e773e7bd85b63cd6042c30786f834338288c5ec4f3742673db360a"
"checksum paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4a4a1c555c6505821f9d58b8779d0f630a6b7e4e1be24ba718610acf01fa79"
"checksum paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26e796e623b8b257215f27e6c80a5478856cae305f5b59810ff9acdaa34570e6"

@ -50,7 +50,6 @@ opt-level = 2
[dependencies]
log = "0.4"
spin = "0.5"
once = "0.3"
xmas-elf = "0.6"
bitflags = "1.0"
bit_field = "0.9"

@ -2,7 +2,6 @@
use alloc::string::String;
use bcm2837::atags::Atags;
use once::*;
#[path = "../../../../drivers/gpu/fb.rs"]
pub mod fb;
@ -18,10 +17,7 @@ pub const IO_REMAP_END: usize = bcm2837::consts::KERNEL_OFFSET + 0x4000_1000;
/// Initialize serial port before other initializations.
pub fn init_serial_early() {
assert_has_not_been_called!("board::init must be called only once");
serial::init();
println!("Hello Raspberry Pi!");
}

@ -1,7 +1,6 @@
use bcm2837::mini_uart::{MiniUart, MiniUartInterruptId};
use core::fmt;
use lazy_static::lazy_static;
use once::*;
use spin::Mutex;
/// Struct to get a global SerialPort interface
@ -23,8 +22,6 @@ impl SerialPort {
/// Init a newly created SerialPort, can only be called once.
fn init(&mut self) {
assert_has_not_been_called!("SerialPort::init must be called only once");
self.mu.init();
super::irq::register_irq(super::irq::Interrupt::Aux, handle_serial_irq);
}

@ -1,7 +1,6 @@
//! ARM64 drivers
use super::board;
use once::*;
pub use self::board::fb;
pub use self::board::serial;
@ -10,8 +9,6 @@ pub mod console;
/// Initialize ARM64 common drivers
pub fn init() {
assert_has_not_been_called!("driver::init must be called only once");
board::init_driver();
console::init();
}

@ -1,7 +1,6 @@
use crate::drivers::bus::pci;
use alloc::string::String;
use mips::registers::cp0;
use once::*;
#[path = "../../../../drivers/console/mod.rs"]
pub mod console;
@ -17,7 +16,6 @@ use fb::FramebufferInfo;
/// Initialize serial port first
pub fn init_serial_early() {
assert_has_not_been_called!("board::init must be called only once");
// initialize serial driver
serial::init(0xbf000900);
// Enable serial interrupt

@ -1,5 +1,4 @@
use alloc::string::String;
use once::*;
#[path = "../../../../drivers/console/mod.rs"]
pub mod console;
@ -11,7 +10,6 @@ pub mod serial;
/// Initialize serial port first
pub fn init_serial_early() {
assert_has_not_been_called!("board::init must be called only once");
serial::init(0xbfd003f8);
println!("Hello QEMU MIPSSIM!");
}

@ -1,5 +1,4 @@
use alloc::string::String;
use once::*;
#[path = "../../../../drivers/console/mod.rs"]
pub mod console;
@ -14,7 +13,6 @@ use fb::FramebufferResult;
/// Initialize serial port first
pub fn init_serial_early() {
assert_has_not_been_called!("board::init must be called only once");
serial::init(0xa3000000);
println!("Hello ThinPad!");
}

@ -1,7 +1,6 @@
//! mipsel drivers
use super::board;
use once::*;
pub use self::board::fb;
pub use self::board::serial;
@ -10,7 +9,6 @@ pub mod console;
/// Initialize common drivers
pub fn init() {
assert_has_not_been_called!("driver::init must be called only once");
board::init_driver();
console::init();
}

@ -1,5 +1,3 @@
use once::*;
pub mod ide;
pub mod keyboard;
pub mod pic;
@ -9,8 +7,6 @@ pub mod serial;
pub mod vga;
pub fn init() {
assert_has_not_been_called!();
// Use IOAPIC instead of PIC
pic::disable();

@ -1,7 +1,6 @@
// Copy from Redox
use log::*;
use once::*;
use spin::Mutex;
use x86_64::instructions::port::Port;
@ -18,8 +17,6 @@ pub fn disable() {
}
pub unsafe fn init() {
assert_has_not_been_called!("pic::init must be called only once");
let mut master = MASTER.lock();
let mut slave = SLAVE.lock();

@ -1,9 +1,7 @@
use log::*;
use once::*;
use x86_64::instructions::port::Port;
pub fn init() {
assert_has_not_been_called!("pit::init must be called only once");
Pit::new(0x40).init(100);
info!("pit: init end");
}

@ -1,4 +1,3 @@
use once::*;
use spin::Mutex;
use uart_16550::SerialPort;
use x86_64::instructions::port::Port;
@ -9,8 +8,6 @@ pub static COM1: Mutex<SerialPort> = Mutex::new(unsafe { SerialPort::new(0x3F8)
pub static COM2: Mutex<SerialPort> = Mutex::new(unsafe { SerialPort::new(0x2F8) });
pub fn init() {
assert_has_not_been_called!("serial::init must be called only once");
COM1.lock().init();
COM2.lock().init();
enable_irq(consts::COM1);

@ -4,12 +4,10 @@ use bitmap_allocator::BitAlloc;
use super::{BootInfo, MemoryRegionType};
use crate::memory::{active_table, init_heap, FRAME_ALLOCATOR};
use log::*;
use once::*;
use rcore_memory::paging::*;
use rcore_memory::PAGE_SIZE;
pub fn init(boot_info: &BootInfo) {
assert_has_not_been_called!("memory::init must be called only once");
init_frame_allocator(boot_info);
init_device_vm_map();
init_heap();

@ -4,7 +4,6 @@ use alloc::string::String;
use core::fmt;
use lazy_static::lazy_static;
use log::*;
use once::*;
use spin::Mutex;
/// Framebuffer information
@ -134,8 +133,6 @@ impl fmt::Debug for Framebuffer {
impl Framebuffer {
fn new(width: u32, height: u32, depth: u32) -> Result<Framebuffer, String> {
assert_has_not_been_called!("Framebuffer::new must be called only once");
let probed_info = super::probe_fb_info(width, height, depth);
match probed_info {

Loading…
Cancel
Save