From owner-cvs-all Sat Jan 20 1:18:44 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 39E7537B400; Sat, 20 Jan 2001 01:18:19 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA04746; Sat, 20 Jan 2001 20:18:10 +1100 Date: Sat, 20 Jan 2001 20:18:45 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Dag-Erling Smorgrav Cc: Peter Wemm , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 vm86bios.s In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 19 Jan 2001, Dag-Erling Smorgrav wrote: > Peter Wemm writes: > > Log: > > EEK! vm86bios.s has got #if NNPX > 0 code without a corresponding > > #include "npx.h" - the code has been dead for a while and vm86 calls > > have not been saving FPU context it seems. > > Why bother with #if NNPX at all? I thought npx was non-optional. Back in 1992, it wasn't clear that their would never be support for alternative (hardware) FPUs. Also, npx0 had to be in kernel config files to provide a place to declare its resources properly. npx was non-optional in 1992, even in theory, because it contained a tiny amount of of the necessary support for FPU emulators, and either an FPU or an emulator was necessary in practice because some critical utilities (fsck?) used floating point. The non-optionality of npx in theory was fixed years later, starting with the following commit: --- RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v Working file: machdep.c head: 1.432 ... ---------------------------- revision 1.226 date: 1997/01/24 19:01:54; author: bde; state: Exp; lines: +25 -4 Initialize CR0_MP in setregs() in case npx0 is disabled or not configured. Disabling npx0 works right now. Don't reference `npxdriver' if npx0 is not configured. Not configuring npx0 doesn't quite work yet. Don't clear potential non-npx pcb flags in setregs(). ---------------------------- --- Not configuring npx0 was fixed a little later as a side effect of modularizing the emulators. The non-optionality of npx in theory was broken about 5 minutes after it was fixed to provide an example of a "mandatory option": --- RCS file: /home/ncvs/src/sys/conf/files.i386,v Working file: files.i386 head: 1.348 ... ---------------------------- revision 1.178 date: 1997/10/28 07:28:34; author: joerg; state: Exp; lines: +2 -2 Use the new "mandatory" keyword for the npx driver. ---------------------------- --- ... despite LINT at the time saying that npx0 really was optional (npx.4 was not fixed to say this). In 2001 (and earlier :-), npx support (i.e., support for the BAD Intel FPU) (hardware or emulated) is clearly required on i386's, and there is not much point in leaving out the small npx module when a large emulator module is configured. Also, there aren't as many resources to configure (no "vector" in config files...) and the remaining ones (irq and port) may as well be hard-coded in npx.c as in hints files. So npx should be non-optional. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message