From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LXUT7-00027F-JR for qemu-devel@nongnu.org; Thu, 12 Feb 2009 00:50:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LXUT5-00026n-PM for qemu-devel@nongnu.org; Thu, 12 Feb 2009 00:50:36 -0500 Received: from [199.232.76.173] (port=54888 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXUT5-00026f-K4 for qemu-devel@nongnu.org; Thu, 12 Feb 2009 00:50:35 -0500 Received: from mout.perfora.net ([74.208.4.194]:53048) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LXUT4-0006wG-Ii for qemu-devel@nongnu.org; Thu, 12 Feb 2009 00:50:34 -0500 From: Cory Fields Date: Thu, 12 Feb 2009 01:48:49 -0500 Message-Id: <1234421329-8119-5-git-send-email-FOSS@AtlasTechnologiesInc.com> In-Reply-To: <1234421329-8119-1-git-send-email-FOSS@AtlasTechnologiesInc.com> References: <1234421329-8119-1-git-send-email-FOSS@AtlasTechnologiesInc.com> Subject: [Qemu-devel] [PATCH] enable quietbios check Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Cory Fields --- 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