]> xenbits.xensource.com Git - seabios.git/commitdiff
config: allow DEBUG_IO for !QEMU
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 5 Jun 2013 07:37:24 +0000 (09:37 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 13 Jun 2013 01:42:15 +0000 (21:42 -0400)
Make DEBUG_IO depend on QEMU_HARDWARE instead of QEMU, so
it can be enabled for seabios builds running indirectly
(coreboot, csm) on qemu.

Add runtime check for PF_QEMU to debug port console to make
sure we don't poke on random ports on physical hardware.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/Kconfig
src/output.c

index 3c801325619f6ea91309a8b6a3da48db3e44d7ea..5882d11abeef9859cb5e55a225cd09842d953af0 100644 (file)
@@ -425,7 +425,7 @@ menu "Debugging"
             Base port for serial - generally 0x3f8, 0x2f8, 0x3e8, or 0x2e8.
 
     config DEBUG_IO
-        depends on QEMU && DEBUG_LEVEL != 0
+        depends on QEMU_HARDWARE && DEBUG_LEVEL != 0
         bool "Special IO port debugging"
         default y
         help
index 79c3adac9e5187e10c5d7b5c34e3611475f850cc..d548766da77ca4219b2ed85badfcd8d2669eed3f 100644 (file)
@@ -11,6 +11,7 @@
 #include "bregs.h" // struct bregs
 #include "config.h" // CONFIG_*
 #include "biosvar.h" // GET_GLOBAL
+#include "paravirt.h" // PlatformRunningOn
 
 struct putcinfo {
     void (*func)(struct putcinfo *info, char c);
@@ -77,7 +78,7 @@ putc_debug(struct putcinfo *action, char c)
 {
     if (! CONFIG_DEBUG_LEVEL)
         return;
-    if (CONFIG_DEBUG_IO)
+    if (CONFIG_DEBUG_IO && runningOnQEMU())
         // Send character to debug port.
         outb(c, GET_GLOBAL(DebugOutputPort));
     if (c == '\n')