Now, ch9-log can run

ch9-log
Yu Chen 3 years ago
parent 0f9a941020
commit 4a62e17755

@ -20,6 +20,6 @@ virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers" }
# easy-fs = { path = "../easy-fs" }
#log = "0.4"
spin = "0.7.0"
# [features]
# board_qemu = []
# board_k210 = []
[features]
board_qemu = []
board_k210 = []

@ -1,3 +1,6 @@
mod qemu;
pub use qemu::*;
pub const CLOCK_FREQ: usize = 12500000;
pub const MMIO: &[(usize, usize)] = &[

@ -19,6 +19,7 @@ use crate::drivers::plic::{IntrTargetPriority, PLIC};
pub fn device_init() {
use riscv::register::sie;
kprintln!("[KERN] board::qemu::device_init() begin");
let mut plic = unsafe { PLIC::new(VIRT_PLIC) };
let hart_id: usize = 0;

@ -12,8 +12,8 @@ extern crate bitflags;
// #[path = "boards/k210.rs"]
// mod board;
// #[cfg(not(any(feature = "board_k210")))]
// #[path = "boards/qemu.rs"]
// #[path = "board/qemu.rs"]
// mod board::qemu;
#[macro_use]
mod console;

Loading…
Cancel
Save