|
|
@ -6,29 +6,25 @@ pub mod memory;
|
|
|
|
pub mod interrupt;
|
|
|
|
pub mod interrupt;
|
|
|
|
pub mod consts;
|
|
|
|
pub mod consts;
|
|
|
|
pub mod cpu;
|
|
|
|
pub mod cpu;
|
|
|
|
|
|
|
|
pub mod driver;
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "board_raspi3")]
|
|
|
|
#[cfg(feature = "board_raspi3")]
|
|
|
|
#[path = "board/raspi3/mod.rs"]
|
|
|
|
#[path = "board/raspi3/mod.rs"]
|
|
|
|
pub mod board;
|
|
|
|
pub mod board;
|
|
|
|
|
|
|
|
|
|
|
|
pub use self::board::timer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
global_asm!(include_str!("boot/boot.S"));
|
|
|
|
global_asm!(include_str!("boot/boot.S"));
|
|
|
|
|
|
|
|
|
|
|
|
/// The entry point of kernel
|
|
|
|
/// The entry point of kernel
|
|
|
|
#[no_mangle] // don't mangle the name of this function
|
|
|
|
#[no_mangle] // don't mangle the name of this function
|
|
|
|
pub extern "C" fn rust_main() -> ! {
|
|
|
|
pub extern "C" fn rust_main() -> ! {
|
|
|
|
// Enable mmu and paging
|
|
|
|
memory::init_mmu_early(); // Enable mmu and paging
|
|
|
|
memory::init_mmu_early();
|
|
|
|
board::init_early();
|
|
|
|
|
|
|
|
|
|
|
|
// Init board to enable serial port.
|
|
|
|
|
|
|
|
board::init();
|
|
|
|
|
|
|
|
println!("{}", LOGO);
|
|
|
|
println!("{}", LOGO);
|
|
|
|
|
|
|
|
|
|
|
|
crate::logging::init();
|
|
|
|
crate::logging::init();
|
|
|
|
interrupt::init();
|
|
|
|
interrupt::init();
|
|
|
|
memory::init();
|
|
|
|
memory::init();
|
|
|
|
timer::init();
|
|
|
|
driver::init();
|
|
|
|
|
|
|
|
|
|
|
|
crate::process::init();
|
|
|
|
crate::process::init();
|
|
|
|
|
|
|
|
|
|
|
|