[PATCH 3/4] probe for quietboot in vgabios

Cory Fields
2009-02-06T23:19:23Z

If quietboot is set disable all normal text output
Errors should still be shown

Signed-off-by: Cory Fields <FOSS@AtlasTechnologiesInc.com>

---
vgabios/vgabios.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/vgabios/vgabios.c b/vgabios/vgabios.c
index e6fe2a0..923ea66 100644
--- a/vgabios/vgabios.c
+++ b/vgabios/vgabios.c
@@ -55,6 +55,10 @@
#endif

#define USE_BX_INFO
+#define BX_CFG_CTL_PORT 0x510
+#define BX_CFG_DATA_PORT 0x511
+#define BX_CFG_SIGNATURE 0x00
+#define BX_CFG_QUIETBOOT 0x08

/* Declares */
static Bit8u read_byte();
@@ -250,6 +254,10 @@ vgabios_init_func:
call cirrus_init
#endif

+ call _qemu_quietboot_probe
+ test al,al
+ jnz skip_display
+
;; display splash screen
call _display_splash_screen

@@ -269,7 +277,7 @@ vgabios_init_func:
;; show cirrus info
call cirrus_display_info
#endif
-
+skip_display:
retf
ASM_END

@@ -3839,6 +3847,13 @@ void printf(s)
#endif

// --------------------------------------------------------------------------------------------
+static int qemu_quietboot_probe()
+{
+ outw(BX_CFG_CTL_PORT, BX_CFG_QUIETBOOT);
+
+ if (inb(BX_CFG_DATA_PORT)) return 1;
+ return 0;
+}

ASM_START
;; DATA_SEG_DEFS_HERE
--
1.6.0.6