qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cory Fields <FOSS@AtlasTechnologiesInc.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] enable quietbios check
Date: Thu, 12 Feb 2009 01:48:49 -0500	[thread overview]
Message-ID: <1234421329-8119-5-git-send-email-FOSS@AtlasTechnologiesInc.com> (raw)
In-Reply-To: <1234421329-8119-1-git-send-email-FOSS@AtlasTechnologiesInc.com>

Signed-off-by: Cory Fields <FOSS@AtlasTechnologiesInc.com>
---
 vgabios.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/vgabios.c b/vgabios.c
index fbc3588..bb78bd5 100644
--- a/vgabios.c
+++ b/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_QUIETBIOS   0x08
 
 /* Declares */
 static Bit8u          read_byte();
@@ -250,6 +254,10 @@ vgabios_init_func:
   call cirrus_init
 #endif
 
+ call   _qemu_quietbios_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
 
@@ -3897,6 +3905,23 @@ ASM_END
 #endif
 
 // --------------------------------------------------------------------------------------------
+int qemu_cfg_port_probe()
+{
+  outw(BX_CFG_CTL_PORT, BX_CFG_SIGNATURE);
+  if (inb(BX_CFG_DATA_PORT) != 'Q') return 0;
+  if (inb(BX_CFG_DATA_PORT) != 'E') return 0;
+  if (inb(BX_CFG_DATA_PORT) != 'M') return 0;
+  if (inb(BX_CFG_DATA_PORT) != 'U') return 0;
+  return 1;
+}
+
+int qemu_quietbios_probe()
+{
+  if(qemu_cfg_port_probe()) 
+    outw(BX_CFG_CTL_PORT, BX_CFG_QUIETBIOS);  
+      if (inb(BX_CFG_DATA_PORT)) return 1;
+  return 0;
+}
 
 ASM_START 
 ;; DATA_SEG_DEFS_HERE
-- 
1.6.0.6

  parent reply	other threads:[~2009-02-12  5:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12  6:48 [Qemu-devel] [PATCH 0/4] Cory Fields
2009-02-12  6:48 ` [Qemu-devel] [PATCH] Define a new route for sending data to bios Cory Fields
2009-02-12  6:41   ` Gleb Natapov
2009-02-12 15:50     ` Blue Swirl
2009-02-12  6:48 ` [Qemu-devel] [PATCH] Add args for quiet and prompt Cory Fields
2009-02-12 10:42   ` Kevin Wolf
2009-02-14 22:27   ` Anthony Liguori
2009-02-15  0:07     ` Cory Fields
2009-02-12  6:48 ` [Qemu-devel] [PATCH] enable quietbios and biosprompt checks Cory Fields
2009-02-14 22:28   ` Anthony Liguori
2009-02-15  0:09     ` Cory Fields
2009-02-12  6:48 ` Cory Fields [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-14 23:57 [Qemu-devel] [PATCH 0/4] Option to suppress bios output and prompt (v2) Cory Fields
2009-02-14 23:57 ` [Qemu-devel] [PATCH] enable quietbios check Cory Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1234421329-8119-5-git-send-email-FOSS@AtlasTechnologiesInc.com \
    --to=foss@atlastechnologiesinc.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).