Replace CONFIG_SCREEN_AND_DEBUG with "etc/screen-and-debug" file.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 6 Jul 2011 00:56:07 +0000 (20:56 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 6 Jul 2011 00:56:07 +0000 (20:56 -0400)
src/Kconfig
src/optionroms.c
src/output.c
src/util.h

index 06ab8c17f08557042e9faa6e2d96999c74371b2a..81acc1c96ed5a5664b3e79979479320e6033597d 100644 (file)
@@ -346,12 +346,4 @@ menu "Debugging"
         default 0x3f8
         help
             Base port for serial - generally 0x3f8, 0x2f8, 0x3e8, or 0x2e8.
-
-    config SCREEN_AND_DEBUG
-        depends on DEBUG_LEVEL != 0
-        bool "Show screen writes on debug ports"
-        default y
-        help
-            Send characters that SeaBIOS writes to the screen to the
-            debug ports.
 endmenu
index 6c4c9ff94ddcd8223f3b9907be74e9299943b94e..3d1a1e41c986ec17bf30884097d6b1b5bbce212c 100644 (file)
@@ -462,6 +462,7 @@ optionrom_setup(void)
  ****************************************************************/
 
 static int S3ResumeVgaInit;
+int ScreenAndDebug;
 
 // Call into vga code to turn on console.
 void
@@ -472,8 +473,10 @@ vga_setup(void)
 
     dprintf(1, "Scan for VGA option rom\n");
 
+    // Load some config settings that impact VGA.
     EnforceChecksum = romfile_loadint("etc/optionroms-checksum", 1);
     S3ResumeVgaInit = romfile_loadint("etc/s3-resume-vga-init", 0);
+    ScreenAndDebug = romfile_loadint("etc/screen-and-debug", 1);
 
     if (CONFIG_OPTIONROMS_DEPLOYED) {
         // Option roms are already deployed on the system.
index 7c10d33e3635dbd9a583081cf9a7521fba11ff59..5c91ae5858a5ea037117d50482e91c6031eaed57 100644 (file)
@@ -115,7 +115,7 @@ screenc(char c)
 static void
 putc_screen(struct putcinfo *action, char c)
 {
-    if (CONFIG_SCREEN_AND_DEBUG)
+    if (ScreenAndDebug)
         putc_debug(&debuginfo, c);
     if (c == '\n')
         screenc('\r');
@@ -363,7 +363,7 @@ printf(const char *fmt, ...)
     va_start(args, fmt);
     bvprintf(&screeninfo, fmt, args);
     va_end(args);
-    if (CONFIG_SCREEN_AND_DEBUG)
+    if (ScreenAndDebug)
         debug_serial_flush();
 }
 
index eecedacfbea3e04ebad27ca9930614589b607874..303c524bd4b79cf424293939524c4210e620c2d9 100644 (file)
@@ -416,6 +416,7 @@ void optionrom_setup(void);
 void vga_setup(void);
 void s3_resume_vga_init(void);
 extern u32 RomEnd;
+extern int ScreenAndDebug;
 
 // bootsplash.c
 void enable_vga_console(void);