switch over to the log uart on boot

this helps minimal configurations to be more useful without pulling
in com/llio crates. The trade-off is that KP's early in boot
(or during resume) are not visible, but, these are (thankfully??)
less rare these days.
This commit is contained in:
bunnie 2022-10-02 21:45:36 +08:00
parent 4b293420c3
commit 18e1d6e867

View file

@ -1313,6 +1313,10 @@ fn boot_sequence(args: KernelArguments, _signature: u32) -> ! {
}
}
}
use utralib::generated::*;
let mut gpio_csr = CSR::new(utra::gpio::HW_GPIO_BASE as *mut u32);
gpio_csr.wfo(utra::gpio::UARTSEL_UARTSEL, 1); // patch us over to a different UART for debug (1=LOG 2=APP, 0=KERNEL(hw reset default))
unsafe {
start_kernel(
arg_offset,