feat: Print more boot info

Temporarily play around with time, loop with
1 second delays.
This commit is contained in:
Berkus Decker 2023-07-30 00:09:09 +03:00 committed by Berkus Decker
parent 9b715f6927
commit c3f23108b9
1 changed files with 26 additions and 4 deletions

View File

@ -35,7 +35,7 @@ use core::panic::PanicInfo;
use machine::devices::SerialOps;
use {
cfg_if::cfg_if,
core::cell::UnsafeCell,
core::{cell::UnsafeCell, time::Duration},
machine::{
arch,
console::console,
@ -45,7 +45,7 @@ use {
mailbox::{channel, Mailbox, MailboxOps},
vc::VC,
},
println, warn,
println, time, warn,
},
};
@ -82,9 +82,31 @@ pub fn kernel_main() -> ! {
#[cfg(test)]
test_main();
command_prompt();
info!(
"{} version {}",
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_VERSION")
);
info!("Booting on: {}", machine::platform::BcmHost::board_name());
reboot()
info!(
"Architectural timer resolution: {} ns",
time::time_manager().resolution().as_nanos()
);
info!("Drivers loaded:");
machine::drivers::driver_manager().enumerate();
// Test a failing timer case.
time::time_manager().spin_for(Duration::from_nanos(1));
loop {
info!("Spinning for 1 second");
time::time_manager().spin_for(Duration::from_secs(1));
}
// command_prompt();
//
// reboot()
}
#[cfg(not(test))]