diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-06-05 09:37:24 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-06-12 21:42:15 -0400 |
commit | 2ca73ed004ed817ea887e28bf9ed97e58a652519 (patch) | |
tree | 03145aa655eb228ce4bc53f1911a5181e98ee678 /src/output.c | |
parent | b98a4b1dae7885097873c5f16ac3fe0ad6543155 (diff) | |
download | seabios-2ca73ed004ed817ea887e28bf9ed97e58a652519.tar.gz |
config: allow DEBUG_IO for !QEMU
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>
Diffstat (limited to 'src/output.c')
-rw-r--r-- | src/output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output.c b/src/output.c index 79c3adac..d548766d 100644 --- a/src/output.c +++ b/src/output.c @@ -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') |