From owner-freebsd-hackers Sat Sep 7 05:06:44 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA03733 for hackers-outgoing; Sat, 7 Sep 1996 05:06:44 -0700 (PDT) Received: from gatekeeper.alcatel.no (ns0.alcatel.no [155.4.1.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA03724 for ; Sat, 7 Sep 1996 05:06:40 -0700 (PDT) Received: from stku50.alcatel.no.norkrets by gatekeeper.alcatel.no (8.7.3/Alcanet-SC) id OAA32581; Sat, 7 Sep 1996 14:06:00 +0200 (MET DST) Received: from stku50 (localhost.alcatel.no) by stku50.alcatel.no.norkrets (4.1/SMI-4.1) id AA03001; Sat, 7 Sep 96 14:05:55 +0200 Message-Id: <323164E0.41C67EA6@alcatel.no> Date: Sat, 07 Sep 1996 14:04:48 +0200 From: Arve Ronning Reply-To: arver@sn.no, Arve.Ronning@alcatel.no X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3_U1 sun4m) Mime-Version: 1.0 To: J Wunsch Cc: arver@sn.no, freebsd-hackers@freebsd.org Subject: Re: Support for fixed-scan monitors References: <199609061814.UAA05394@uriah.heep.sax.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk J Wunsch wrote: > > As Arve Ronning wrote: > > > I've been thinking about submitting my patches to FreeBSD.org. The new code > > would be hidden behind an 'option PREFER_MDA'. But as one of the changes is > > in the boot-blocks I think this will be a problem because kernel-config > > options aren't visible when making the boot-blocks (I'm on thin ice here, > > please feel free to give some advice:). > > This is tricky and in the same boat as the ``FORCE_COMCONSOLE'' stuff > that is already in the bootstrap. Probing would be more ideal, but > 7.5 KB are not plenty of space. > Ok, I'll have a look at the 'FORCE_COMCONSOLE' stuff. >From my old files I can see that I first did the 'PREFER_MDA' thing in jan.96 and it has worked ok with three different BIOSes/motherboards. What it does is this : (compared to the stock version) in start.S : old new use whatever BIOS #ifdef PREFER_MDA is using; if (BIOS is using MDA) /*do nothing*/; else if (MDA present) { /* 'probe' ! */ 'trick' BIOS into using MDA; } #endif use whatever BIOS is using; in syscons.c, scinit() : old new if (!(VGA present)) #ifdef PREFER_MDA use MDA; if (MDA present) else use MDA; use VGA; else use VGA; #else if (!(VGA present)) use MDA; else use VGA; #endif The (MDA present) and (VGA present) 'probes' are simple write-something-and- check-if-it-can-be-read-back (like the original in scinit()). What this is all meant to achieve is : 1) if PREFER_MDA is *not* defined, the code is unchanged. 2) if PREFER_MDA is defined and only MDA present, MDA is used. 3) if PREFER_MDA is defined and both MDA and VGA present, MDA is used. 4) if PREFER_MDA is defined and only VGA is present, VGA is used. So, in effect PREFER_MDA does what it says : PREFER MDA over VGA, while the original code does PREFER VGA over MDA. (And the point to all this is that my large cheap fixed-scan monitor can be used for X while the MDA monitor is used for booting and starting X:). Would you be interested in looking at the patches and give me your opinion ? Do you think there would be any interest in including this in -current ? (or any other version for that matter:). Regards Arve