From nobody Sat May 10 07:50:15 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) client-ip=80.81.252.135; envelope-from=seabios-bounces@seabios.org; helo=mail.coreboot.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 1489769406457221.7636622208488; Fri, 17 Mar 2017 09:50:06 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coresystems.de) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1cov4a-0005P5-FT; Fri, 17 Mar 2017 17:49:52 +0100 Received: from das-labor.org ([188.40.89.130]) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1cov4R-0005N6-Lw for seabios@seabios.org; Fri, 17 Mar 2017 17:49:50 +0100 From: Patrick Rudolph Authentication-Results: das-labor.org; dkim=permerror (bad message/signature format) To: seabios@seabios.org Date: Fri, 17 Mar 2017 17:49:39 +0100 Message-ID: <1489769382-21786-2-git-send-email-siro@das-labor.org> In-Reply-To: <1489769382-21786-1-git-send-email-siro@das-labor.org> References: <1489769382-21786-1-git-send-email-siro@das-labor.org> X-Spam-Score: -2.7 (--) Subject: [SeaBIOS] [PATCH 1/4] SeaVGABios/cbvga: Assume VGA compatible GPU in text-mode X-BeenThere: seabios@seabios.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SeaBIOS mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: seabios-bounces@seabios.org Sender: "SeaBIOS" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Assume the GPU is VGA compatible when running in text-mode. Advertise VGA modes using SeaVGABios' stdvga driver. Microsoft Windows relies on graphics mode 12 as last resort when running in text mode, even when not advertised. Allows Windows 7 to boot in 640x480 and 16 colors mode using the VgaSave driver. Allows Windows 7 to show the loading bar splash screen. Known issues: The palette seems wrong, as colors are swapped ( blue is red, ... ). Signed-off-by: Patrick Rudolph --- vgasrc/cbvga.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index ebd17b0..87ec77e 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -20,6 +20,10 @@ static u32 CBlinelength VAR16; =20 struct vgamode_s *cbvga_find_mode(int mode) { + /* Assume VGA compatible hardware in text-mode. */ + if (GET_GLOBAL(CBmode) =3D=3D 0x3) + return stdvga_find_mode(mode); + if (mode =3D=3D GET_GLOBAL(CBmode)) return &CBmodeinfo; if (mode =3D=3D 0x03) @@ -30,11 +34,11 @@ struct vgamode_s *cbvga_find_mode(int mode) void cbvga_list_modes(u16 seg, u16 *dest, u16 *last) { - if (dest