diff --git a/src/console/qemu_debugcon_console.c b/src/console/qemu_debugcon_console.c index 3037e3651c..e2591baa15 100644 --- a/src/console/qemu_debugcon_console.c +++ b/src/console/qemu_debugcon_console.c @@ -21,13 +21,18 @@ #include #include +static unsigned char readback; + static void debugcon_init(void) { + readback = inb(CONFIG_CONSOLE_QEMU_DEBUGCON_PORT); } static void debugcon_tx_byte(unsigned char data) { - outb(data, CONFIG_CONSOLE_QEMU_DEBUGCON_PORT); + if (readback == 0xe9) { + outb(data, CONFIG_CONSOLE_QEMU_DEBUGCON_PORT); + } } static void debugcon_tx_flush(void)