:p
atchew
Login
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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hw/serialio.c b/src/hw/serialio.c index XXXXXXX..XXXXXXX 100644 --- a/src/hw/serialio.c +++ b/src/hw/serialio.c @@ -XXX,XX +XXX,XX @@ u16 DebugOutputPort VARFSEG = 0x402; void qemu_debug_preinit(void) { + /* Xen already overrode DebugOutputPort in xen_preinit(). */ + if (runningOnXen()) + return; + /* Check if the QEMU debug output port is active */ if (CONFIG_DEBUG_IO && inb(GET_GLOBAL(DebugOutputPort)) != QEMU_DEBUGCON_READBACK) -- 2.25.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org
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> v2 Re-word comment --- src/hw/serialio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hw/serialio.c b/src/hw/serialio.c index XXXXXXX..XXXXXXX 100644 --- a/src/hw/serialio.c +++ b/src/hw/serialio.c @@ -XXX,XX +XXX,XX @@ 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) -- 2.25.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org