]> xenbits.xensource.com Git - seabios.git/commitdiff
Add option CONFIG_SCREEN_AND_DEBUG to control printf and debugging.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 2 Aug 2009 17:18:27 +0000 (13:18 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 2 Aug 2009 17:18:27 +0000 (13:18 -0400)
New option controls whether or not printf content is also written to
    the debug ports.

src/config.h
src/output.c

index 20e74c768197fc66b2930f95832ae16b90a3c4da..98b69e82d11b187b6e30ac56e50267bebe522536 100644 (file)
 
 // Control how verbose debug output is.
 #define CONFIG_DEBUG_LEVEL 1
-
 // Send debugging information to serial port
 #define CONFIG_DEBUG_SERIAL 0
+// Screen writes are also sent to debug ports.
+#define CONFIG_SCREEN_AND_DEBUG 1
 
 // Support for int13 floppy drive access
 #define CONFIG_FLOPPY_SUPPORT 1
index 6665b6316479db0179595490e72f65b2fb8523ee..1cd0b8cbfffa9e4b25be1f0cc1585310eff28c63 100644 (file)
@@ -48,7 +48,7 @@ debug_serial(char c)
     outb(c, DEBUG_PORT+SEROFF_DATA);
 }
 
-// Write a character to the serial port.
+// Make sure all serial port writes have been completely sent.
 static void
 debug_serial_flush()
 {
@@ -79,7 +79,7 @@ screenc(u8 c)
 static void
 putc(u16 action, char c)
 {
-    if (CONFIG_DEBUG_LEVEL) {
+    if (CONFIG_DEBUG_LEVEL && (CONFIG_SCREEN_AND_DEBUG || !action)) {
         if (! CONFIG_COREBOOT)
             // Send character to debug port.
             outb(c, PORT_BIOS_DEBUG);