From owner-freebsd-hackers Thu Oct 12 23:13:43 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id XAA17154 for hackers-outgoing; Thu, 12 Oct 1995 23:13:43 -0700 Received: from aslan.cdrom.com (aslan.cdrom.com [192.216.223.142]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id XAA17147 for ; Thu, 12 Oct 1995 23:13:41 -0700 Received: from localhost.cdrom.com (localhost.cdrom.com [127.0.0.1]) by aslan.cdrom.com (8.6.12/8.6.9) with SMTP id XAA05319; Thu, 12 Oct 1995 23:12:56 -0700 Message-Id: <199510130612.XAA05319@aslan.cdrom.com> X-Authentication-Warning: aslan.cdrom.com: Host localhost.cdrom.com didn't use HELO protocol To: Julian Elischer cc: terry@lambert.org (Terry Lambert), jhay@mikom.csir.co.za, hackers@FreeBSD.ORG Subject: Re: IPX now available In-reply-to: Your message of "Thu, 12 Oct 1995 22:20:41 PDT." <199510130520.WAA06691@ref.tfs.com> Date: Thu, 12 Oct 1995 23:12:56 -0700 From: "Justin T. Gibbs" Sender: owner-hackers@FreeBSD.ORG Precedence: bulk >> A loadable kernel component is code that when loaded sets itself up as >> if it had always been there, and if unloaded, removes itself as if it >> had never been there. >[..] >> >> Probe includes: >> a) determination of IRQ(s) used by a single device instance before >> attach. >BSD4.3 did this on VME and DEC busses >It's harder when the system is already going and interrupts are in use.. > >> b) determination of DRQ(s) used by a single device instance before >> attach. >this one gets really difficult. >> c) determination of I/O address range(s) used by a single device >> instance before attach. >[.....] >ok, well it's all true.. >and I'm slowely moving in that direction >but you see there's the JOB I keep having to do... > >julian Actually, I'd rather not have to have all of the IRQ, DRQ, ports, etc determined during probe. Look at EISA or PCI devices... the probe is a non-intrusive determination if a card is present and what driver may be apporpriate for that device. The IRQ, DRQ, and port range determination should only happen after we know that we have something worth talking to (ie the probe is successfull). This works so long as we allow attaches to fail (which they could for other reasons like insufficient memory). I'd rather design the system to look like: probe () { minimum to determin presence of hardware } attach() { Determin port Addresses if (!reserve port address) { return some error code } Determine IRQ if (!Map IRQ Handler) { release port address return some error code } Register other resources... Setup the card for work Enable interrupts return success } The new EISA code will follow this approach. -- Justin T. Gibbs =========================================== Software Developer - Walnut Creek CDROM FreeBSD: Turning PCs into workstations ===========================================