+ /*
+ * Attempts to panic (or otherwise log to console) during early boot
+ * can result in _doprnt() and _doprnt_log() being called from
+ * _kprintf() before PE_init_kprintf() has been called. This causes
+ * the "putc" param to _doprnt() and _doprnt_log() to be passed as
+ * NULL. That NULL makes its way here, and we would try jump to it.
+ * Given that this is a poor idea, and this happens at very early
+ * boot, there is not a way to report this easily (we are likely
+ * already panicing), so we'll just do nothing instead of crashing.
+ */
+ if (real_putc) {
+ real_putc((char)ch);
+ }