-
- disable_preemption();
- _doprnt_log(fmt, &ap, cons_putc_locked, 16);
- enable_preemption();
+ /*
+ * for early boot printf()s console may not be setup,
+ * fallback to good old cnputc
+ */
+ if (cpu_data_p->cpu_console_buf != NULL) {
+ console_printbuf_state_init(&info_data, TRUE, TRUE);
+ __doprnt(fmt, ap, console_printbuf_putc, &info_data, 16, TRUE);
+ console_printbuf_clear(&info_data);
+ } else {
+ disable_preemption();
+ _doprnt_log(fmt, &ap, cons_putc_locked, 16);
+ enable_preemption();
+ }