IRQ-based VirtIOBlk Access. Plz wait for the virtio-drivers crate to be updated.
This commit is contained in:
parent
017758bf2b
commit
c6db34e2c7
13 changed files with 258 additions and 22 deletions
|
@ -29,9 +29,7 @@ mod task;
|
|||
mod timer;
|
||||
mod trap;
|
||||
|
||||
use core::arch::global_asm;
|
||||
|
||||
global_asm!(include_str!("entry.asm"));
|
||||
core::arch::global_asm!(include_str!("entry.asm"));
|
||||
|
||||
fn clear_bss() {
|
||||
extern "C" {
|
||||
|
@ -44,6 +42,15 @@ fn clear_bss() {
|
|||
}
|
||||
}
|
||||
|
||||
use lazy_static::*;
|
||||
use sync::UPSafeCell;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref DEV_NON_BLOCKING_ACCESS: UPSafeCell<bool> = unsafe {
|
||||
UPSafeCell::new(false)
|
||||
};
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn rust_main() -> ! {
|
||||
clear_bss();
|
||||
|
@ -53,8 +60,10 @@ pub fn rust_main() -> ! {
|
|||
trap::init();
|
||||
trap::enable_timer_interrupt();
|
||||
timer::set_next_trigger();
|
||||
board::device_init();
|
||||
fs::list_apps();
|
||||
task::add_initproc();
|
||||
*DEV_NON_BLOCKING_ACCESS.exclusive_access() = true;
|
||||
task::run_tasks();
|
||||
panic!("Unreachable in rust_main!");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue