[coreboot-gerrit] New patch to review for coreboot: 366ff1e console: add qemu debugcon detection
Gerd Hoffmann (kraxel@redhat.com)
gerrit at coreboot.org
Thu May 30 10:41:57 CEST 2013
Gerd Hoffmann (kraxel at redhat.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3338
-gerrit
commit 366ff1e90049c7ae98d39f1d99ca67342cd1fa87
Author: Gerd Hoffmann <kraxel at redhat.com>
Date: Thu May 30 10:33:38 2013 +0200
console: add qemu debugcon detection
The qemu debugcon port returns 0xe9 on reads in case the device is
present. Use that for detection and write console output to the
port only in case the device is actually present.
Change-Id: I41aabcf11845d24004e4f795dfd799822fd14646
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
src/console/qemu_debugcon_console.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/console/qemu_debugcon_console.c b/src/console/qemu_debugcon_console.c
index 3037e36..e2591ba 100644
--- a/src/console/qemu_debugcon_console.c
+++ b/src/console/qemu_debugcon_console.c
@@ -21,13 +21,18 @@
#include <console/console.h>
#include <arch/io.h>
+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)
More information about the coreboot-gerrit
mailing list