From owner-freebsd-arch Tue Jun 13 11:42:48 2000 Delivered-To: freebsd-arch@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 315D437BFA5 for ; Tue, 13 Jun 2000 11:42:45 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id MAA07731; Tue, 13 Jun 2000 12:42:43 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id MAA16197; Tue, 13 Jun 2000 12:41:36 -0600 (MDT) Message-Id: <200006131841.MAA16197@harmony.village.org> To: Terry Lambert Subject: Re: cvs commit: src/sys/pci pci.c pcisupport.c pcivar.h Cc: mjacob@feral.com, arch@FreeBSD.ORG In-reply-to: Your message of "Tue, 13 Jun 2000 16:42:15 -0000." <200006131642.JAA08631@usr05.primenet.com> References: <200006131642.JAA08631@usr05.primenet.com> Date: Tue, 13 Jun 2000 12:41:36 -0600 From: Warner Losh Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200006131642.JAA08631@usr05.primenet.com> Terry Lambert writes: : This is not the case for SBUS or PCI hardware, which can be data : driven using a table. I think that the active probe case still : needs to be dealt with. The trouble is generating this table. Right now none of the busses have any concept of a table driven approach to plug and play. That has all been moved down into the drivers' probe routines. And some of our probe routines will attach to generic things rather than to things with a certain ID (eg, the serial driver for pci should attach to all communication devices that are serial 16550 compatible). In pccard land, we ant all modems to attach to sio and all fixed disk to attach to ata. In the pccard world things also get complicated by the fact that there are multi-function cards that need some special help as well. These wrinkles make having a single table format for all busses difficult, and may make having some bus tables fairly complex. :-(. : Windows 95/98/2000/NT handle this by paging in the probe code, : running it, and if it probes true, paging in the driver and doing : the attach. The probe code is then discarded. : : Each severable section is in a seperate ELF section, on a 4k page : boundary (logical, not physical, in the ELF file). I like this idea. Too bad we don't have pagable kernel driver support (hint hint). The next best thign would be to load the driver, call its probe routines and then unload it if it didn't attach to anything. You'd want to do this in a lazy way. Load the driver while probing the bus if all drivers currently loaded reject the device as well as deferring unload until all devices on the bus have been probed so that you don't thrash on startup. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message