Index: sys/dev/uart/uart_dev_pl011.c =================================================================== --- sys/dev/uart/uart_dev_pl011.c +++ sys/dev/uart/uart_dev_pl011.c @@ -611,3 +611,18 @@ __uart_setreg(bas, UART_IMSC, psc->imsc); uart_unlock(sc->sc_hwmtx); } + +#ifdef EARLY_PRINTF +static void +uart_pl011_early_putc(int c) +{ + u_int *base = (void *)(uintptr_t)SOCDEV_VA; + volatile u_int *tx = base + UART_DR; + volatile u_int *fr = base + UART_FR; + + while ((*fr & FR_TXFF) != 0) + ; + *tx = c; +} +early_putc_t *early_putc = uart_pl011_early_putc; +#endif