Print hartid after hello world

This commit is contained in:
gil 2024-05-16 00:36:19 -05:00
parent 1644d5a068
commit 6846ecbcc0

View file

@ -63,6 +63,8 @@ extern "C" fn start() -> ! {
unsafe { uart::init_console(0x1000_0000) }; unsafe { uart::init_console(0x1000_0000) };
println!("Hello, world!"); println!("Hello, world!");
println!("hartid: {}", riscv::register::mhartid::read());
loop { loop {
let c = uart::CONSOLE.lock().as_mut().and_then(uart::Device::get); let c = uart::CONSOLE.lock().as_mut().and_then(uart::Device::get);
if let Some(c) = c { if let Some(c) = c {