aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2011-07-05 20:56:07 -0400
committerKevin O'Connor <kevin@koconnor.net>2011-07-05 20:56:07 -0400
commit422263deac25e45301bd069b1a0d680db55a31d9 (patch)
tree2824ea429620bc3c1d0c9bb3e600b04239062540
parent8b0c509e7cdb55b0ebd58cc105e49e75526ba620 (diff)
downloadseabios-422263deac25e45301bd069b1a0d680db55a31d9.zip
seabios-422263deac25e45301bd069b1a0d680db55a31d9.tar.gz
seabios-422263deac25e45301bd069b1a0d680db55a31d9.tar.bz2
Replace CONFIG_SCREEN_AND_DEBUG with "etc/screen-and-debug" file.
-rw-r--r--src/Kconfig8
-rw-r--r--src/optionroms.c3
-rw-r--r--src/output.c4
-rw-r--r--src/util.h1
4 files changed, 6 insertions, 10 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 06ab8c1..81acc1c 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -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
diff --git a/src/optionroms.c b/src/optionroms.c
index 6c4c9ff..3d1a1e4 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -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.
diff --git a/src/output.c b/src/output.c
index 7c10d33..5c91ae5 100644
--- a/src/output.c
+++ b/src/output.c
@@ -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();
}
diff --git a/src/util.h b/src/util.h
index eecedac..303c524 100644
--- a/src/util.h
+++ b/src/util.h
@@ -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);