1 2 3 4 5 6 7 8 9 10 11
use core::ptr::NonNull; pub fn init_debugcon(fdt: *mut u8) -> Option<()> { fn phys_to_virt(p: usize) -> *mut u8 { p as _ } let uart = any_uart::init(NonNull::new(fdt)?, phys_to_virt)?; super::set_uart(uart)?; Some(()) }