Add ns16550a

This commit is contained in:
Yifan Wu 2022-02-18 13:09:03 -08:00
parent fef12c79f1
commit 704eae3bb0
16 changed files with 311 additions and 129 deletions

View file

@ -46,17 +46,13 @@ use lazy_static::*;
use sync::UPSafeCell;
lazy_static! {
pub static ref DEV_NON_BLOCKING_ACCESS: UPSafeCell<bool> = unsafe {
UPSafeCell::new(false)
};
pub static ref DEV_NON_BLOCKING_ACCESS: UPSafeCell<bool> = unsafe { UPSafeCell::new(false) };
}
#[no_mangle]
pub fn rust_main() -> ! {
clear_bss();
println!("[kernel] Hello, world!");
mm::init();
mm::remap_test();
trap::init();
trap::enable_timer_interrupt();
timer::set_next_trigger();