X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/e2d2fc5c71f7d145cba7267989251af45e3bb5ba..7ddcb079202367355dddccdfa4318e57d50318be:/pexpert/i386/pe_kprintf.c diff --git a/pexpert/i386/pe_kprintf.c b/pexpert/i386/pe_kprintf.c index 6533908eb..68d5fc2eb 100644 --- a/pexpert/i386/pe_kprintf.c +++ b/pexpert/i386/pe_kprintf.c @@ -36,6 +36,7 @@ #include #include #include +#include /* Globals */ void (*PE_kputc)(char c); @@ -105,10 +106,13 @@ void kprintf(const char *fmt, ...) boolean_t state; if (!disable_serial_output) { - + boolean_t early = FALSE; + if (rdmsr64(MSR_IA32_GS_BASE) == 0) { + early = TRUE; + } /* If PE_kputc has not yet been initialized, don't * take any locks, just dump to serial */ - if (!PE_kputc) { + if (!PE_kputc || early) { va_start(listp, fmt); _doprnt(fmt, &listp, pal_serial_putc, 16); va_end(listp);