From owner-freebsd-hackers Thu Jan 27 22:30:33 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 6EE3514C9C; Thu, 27 Jan 2000 22:30:22 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id BAA11680; Fri, 28 Jan 2000 01:30:13 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <200001280630.BAA11680@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200001280625.PAA27800@zodiac.mech.utsunomiya-u.ac.jp> Date: Fri, 28 Jan 2000 01:30:12 -0500 (EST) From: John Baldwin To: Kazutaka YOKOTA Subject: RE: Setting the video mode during boot (was: Re: VGA card (mis)b Cc: rnordier@FreeBSD.org, msmith@FreeBSD.org, Brian Fundakowski Feldman , hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 28-Jan-00 Kazutaka YOKOTA wrote: >>> The word at 0x463 in the BIOS data area tells at which I/O address the >>> CRTC is sitting on. It's 0x3b4 for the monochrome adapter and EGA/VGA >>> in a monochrome mode, and 0x3d4 for CGA and EGA/VGA in a color mode. >>> >>> So, we should try to set the mode 3 when we find 0x3d4 and the mode 7 >>> for 0x3b4. >> >>I knew someone would know. :) I'll try to work on a patch for this tonight >>if I have time. Would it be ok if this was done very early on, like before >>the loader binary itself was started? IOW, do it in btxldr? We might also >>want to do it in boot1. > > There probably isn't much space in boot1. I think we can fit it in boot1, at least I'm going to try. Even boot2 would be before btxldr was run. IMO, here's what we should do: After we run the code to detect a serial console in boot[12], or cdldr, or the forthcoming pxeldr, if it is not a serial console, then reset the video mode to either 3 or 7 based on the word at 0x463. Then it's done at the very beginning of the process before btxldr is started. > While boot2 and loader(8) print string on the video adapter via BIOS, > btxldr appears to assume the video card is in the text mode (whether > it is mono or color) and directly goes to the text buffer address > (0xb8000 for color and 0xb0000 for mono). > > I think we may set the video mode at the very beginning of btxldr. > But, even if we cannot find space to do so in btxldr, I won't moan. > Because I don't think we will loose vital information even if we don't > see btxldr's banner. So, setting the video mode during boot2 or in > loader(8) should be sufficient, I would expect... > > Kazu -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message