]> xenbits.xensource.com Git - seabios.git/commitdiff
serialio: Preserve Xen DebugOutputPort
authorJason Andryuk <jandryuk@gmail.com>
Wed, 24 Jun 2020 14:25:13 +0000 (10:25 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 24 Jun 2020 15:44:06 +0000 (11:44 -0400)
xen_preinit() runs early and changes DebugOutputPort.  qemu_preinit() runs
soon after.  inb on DebugOutputPort doesn't work on Xen, so the check
will always fail and DebugOutputPort will be cleared to 0 disabling
output.

Quick exit the function when running on Xen to preserve the modified
DebugOutputPort.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
src/hw/serialio.c

index 31633443780a2ee0cb514334c06562bf72ba7dd4..fa663b9949191d930c395cea9498c103b0884027 100644 (file)
@@ -106,6 +106,10 @@ u16 DebugOutputPort VARFSEG = 0x402;
 void
 qemu_debug_preinit(void)
 {
+    /* Xen doesn't support checking if debug output is active. */
+    if (runningOnXen())
+        return;
+
     /* Check if the QEMU debug output port is active */
     if (CONFIG_DEBUG_IO &&
         inb(GET_GLOBAL(DebugOutputPort)) != QEMU_DEBUGCON_READBACK)