16 #include <linux/kernel.h>
18 #include <linux/string.h>
20 #include <asm/setup.h>
23 static void early_hv_write(
struct console *
con,
const char *
s,
unsigned n)
28 static struct console early_hv_console = {
30 .write = early_hv_write,
36 static struct console *early_console = &early_hv_console;
37 static int early_console_initialized;
38 static int early_console_complete;
40 static void early_vprintk(
const char *
fmt,
va_list ap)
44 early_console->
write(early_console, buf, n);
51 early_vprintk(fmt, ap);
61 early_vprintk(fmt, ap);
62 early_console->
write(early_console,
"\n", 1);
72 if (early_console_initialized)
78 early_console = &early_hv_console;
79 early_console_initialized = 1;
87 early_console_complete = 1;
88 if (!early_console_initialized || !early_console)
93 early_console_initialized = 0;
101 if (early_console_complete || early_console_initialized)
104 Machine shutting down before console output is fully initialized.\n\
105 You may wish to reboot and add the option 'earlyprintk' to your\n\
106 boot command line to see any diagnostic early console output.\n\