From owner-freebsd-commit Thu Dec 14 05:05:33 1995 Return-Path: owner-commit Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA00703 for freebsd-commit-outgoing; Thu, 14 Dec 1995 05:05:33 -0800 (PST) Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA00557 for cvs-all-outgoing; Thu, 14 Dec 1995 05:02:49 -0800 (PST) Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA00549 for cvs-user-outgoing; Thu, 14 Dec 1995 05:02:46 -0800 (PST) Received: from jhome.DIALix.COM (root@jhome.DIALix.COM [192.203.228.69]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id FAA00536 Thu, 14 Dec 1995 05:02:31 -0800 (PST) Received: (from peter@localhost) by jhome.DIALix.COM (8.7.3/8.7.3) id VAA03988; Thu, 14 Dec 1995 21:00:32 +0800 (WST) Date: Thu, 14 Dec 1995 21:00:32 +0800 (WST) From: Peter Wemm To: Paul Richards cc: Bruce Evans , CVS-committers@freefall.freebsd.org, cvs-user@freefall.freebsd.org, phk@freefall.freebsd.org Subject: Re: cvs commit: src/lkm/gnufpu Makefile In-Reply-To: <199512141245.MAA22992@cadair.elsevier.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-commit@FreeBSD.ORG Precedence: bulk On Thu, 14 Dec 1995, Paul Richards wrote: > In reply to Bruce Evans who said > > > > > Modified: lkm Makefile > > > Added: lkm/fpu Makefile > > > lkm/gnufpu Makefile > > > Log: > > > Two x87 emulators as LKMs. > > > If somebody with the right HW would make the change to /etc/rc to use > > > this, we could rip MATH_EMULATE from GENERIC... > > The kernel should load it if the npx probe fails. Can we do this yet or will > it require an in-kernel linker? It's something we need to be able do so > that we can load device drivers on the fly following probes so all you have > to have compiled in is the probe routines or actually you can load the device > driver, do probe and then unload it if it fails. All you need then is a list > of available drivers. The math emulators are a special case. They have a _single_ entry point, and I dont think (from memory) that they reference anything else in the kernel. We may be able to get away with a very simple a.out style loader and relocator for this special purpose. (ie: do vnode IO to read in the a.out header, malloc some space, do vnode IO to bring in the code, then relocate it, then set the trap handler to point to the first bit of executable code. Make it all do vnode IO to (say) /sbin/emulator.o and leave an a.out format object file there. This is something like what SYSV does, except the SYSV one is PIC I think... I created math emulator LKM's too, about a week ago, but once I realised they were useless, I dropped them. -Peter