From owner-freebsd-new-bus Fri Apr 7 11:42:13 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from mailgate.originative.co.uk (mailgate.originative.co.uk [194.217.50.228]) by hub.freebsd.org (Postfix) with ESMTP id 1FEA437B7CB for ; Fri, 7 Apr 2000 11:42:08 -0700 (PDT) (envelope-from paul@originative.co.uk) Received: from originative.co.uk (lobster.originative.co.uk [194.217.50.241]) by mailgate.originative.co.uk (Postfix) with ESMTP id 05FDE1D131 for ; Fri, 7 Apr 2000 19:42:07 +0100 (BST) Message-ID: <38EE2BFE.B696AD7@originative.co.uk> Date: Fri, 07 Apr 2000 19:42:06 +0100 From: Paul Richards Organization: Originative Solutions Ltd X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en-GB, en MIME-Version: 1.0 To: new-bus@freebsd.org Subject: Driver source location Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Is this list active? I don't ever seem to get any mail from it. Anyway, this is slightly off topic but I was also wondering whether this list wouldn't be better off as the device drivers list. What's our current thinking of where to place device driver sources these days. A lot of the code has migrated out of /sys/i386/isa over the last year as it's been newbusified but where it's gone to has varied. Some devices are in /sys/pci some are in /sys/dev and the whole thing seems a little messy to me. Why not put everything in /sys/dev and if we need to subdivide do it on the basis of function, and then subdivide each driver on the basis of either bus or arch as necessary. e.g. /sys/dev/lnc for generic lnc code /sys/dev/lnc/pci for PCI bus code /sys/dev/lnc/isa for ISA bus code etc. A lot of the drivers already do this unless they are not multi-bus, in which case they seem to live in the /sys/pci directory (or equivalent). This scattering seems rather pointless and if another bus gets supported later it gets even more messy. I've also been thinking that for drivers that can be made into modules, why not just put them in /sys/modules? If we're hoping that third-parties will start writing modules then life would be a lot simpler if a self-contained package could be dropped in to /sys/modules, rather than having to drop files into X locations. For the static kernel crowd what we need is a tool that can bind modules into a static kernel at build time and then all module-able code can be moved in to self-contained directories. While I'm rambling, the newbusification is also a little haphazard, some drivers have hooked into the newbus probing mechanism but not the new style resource management. I think a driver should be moved over entirely to the new code before it can be said to have been newbusified. Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Fri Apr 7 12: 2:53 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by hub.freebsd.org (Postfix) with ESMTP id 6A34137BFE9 for ; Fri, 7 Apr 2000 12:02:40 -0700 (PDT) (envelope-from n_hibma@calcaphon.com) Received: from calcaphon.demon.co.uk ([193.237.19.5] helo=bluebottle.qubesoft.com) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 12de1a-000FfL-0V; Fri, 7 Apr 2000 20:02:35 +0100 Received: from henny.qubesoft.com (henny.qubesoft.com [192.168.1.5]) by bluebottle.qubesoft.com (8.9.3/8.9.1) with ESMTP id UAA89286; Fri, 7 Apr 2000 20:05:35 +0100 (BST) (envelope-from n_hibma@calcaphon.com) Date: Fri, 7 Apr 2000 19:59:36 +0100 (BST) From: Nick Hibma X-Sender: n_hibma@localhost Reply-To: Nick Hibma To: Paul Richards Cc: new-bus@freebsd.org Subject: Re: Driver source location In-Reply-To: <38EE2BFE.B696AD7@originative.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I've also been thinking that for drivers that can be made into modules, > why not just put them in /sys/modules? If we're hoping that > third-parties will start writing modules then life would be a lot > simpler if a self-contained package could be dropped in to /sys/modules, > rather than having to drop files into X locations. You don't have. There are modules that have their .c files in the /sys/modules direcotry. find /sys/modules -name \*.c is your friend. :-) Nick -- n_hibma@webweaving.org n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Fri Apr 7 12: 5:12 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id F199137BFD0 for ; Fri, 7 Apr 2000 12:04:59 -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 NAA07016; Fri, 7 Apr 2000 13:04:56 -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 NAA01361; Fri, 7 Apr 2000 13:04:04 -0600 (MDT) Message-Id: <200004071904.NAA01361@harmony.village.org> To: Nick Hibma Subject: Re: Driver source location Cc: Paul Richards , new-bus@FreeBSD.ORG In-reply-to: Your message of "Fri, 07 Apr 2000 19:59:36 BST." References: Date: Fri, 07 Apr 2000 13:04:04 -0600 From: Warner Losh Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message Nick Hibma writes: : You don't have. There are modules that have their .c files in the : /sys/modules direcotry. : : find /sys/modules -name \*.c : : is your friend. :-) But I thought we weren't supposed to put source that wasn't Makefiles into /sys/modules. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Fri Apr 7 12: 8:54 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id E410037BF83 for ; Fri, 7 Apr 2000 12:08:50 -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 NAA07039; Fri, 7 Apr 2000 13:08:49 -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 NAA01401; Fri, 7 Apr 2000 13:07:57 -0600 (MDT) Message-Id: <200004071907.NAA01401@harmony.village.org> To: Paul Richards Subject: Re: Driver source location Cc: new-bus@FreeBSD.ORG In-reply-to: Your message of "Fri, 07 Apr 2000 19:42:06 BST." <38EE2BFE.B696AD7@originative.co.uk> References: <38EE2BFE.B696AD7@originative.co.uk> Date: Fri, 07 Apr 2000 13:07:57 -0600 From: Warner Losh Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <38EE2BFE.B696AD7@originative.co.uk> Paul Richards writes: : Why not put everything in /sys/dev and if we need to subdivide do it on : the basis of function, and then subdivide each driver on the basis of : either bus or arch as necessary. That's the idea. : e.g. : /sys/dev/lnc : for generic lnc code : /sys/dev/lnc/pci : for PCI bus code : /sys/dev/lnc/isa : for ISA bus code There's no need to have a separate file for the bus stuff. It is almost never large enough to warrant anything but its own file. In this case you'd have sys/dev/lnc with if_lnc.c being the main driver, if_lnc_isa.c being the isa attachment, if_lnc_pccard.c being for the pccard attachment, if_lnc_pci.c being for the pci attachment. Generally if_lncvar.h is for driver internal defines (softc, things like that) and if_lncreg.h is for the hardware description of an lnc. : A lot of the drivers already do this unless they are not multi-bus, in : which case they seem to live in the /sys/pci directory (or equivalent). : This scattering seems rather pointless and if another bus gets supported : later it gets even more messy. The sys/pci really should be broken up. And it should be sys/dev/pci, but too many people whined when I suggested that. Ditto for sys/isa. : While I'm rambling, the newbusification is also a little haphazard, some : drivers have hooked into the newbus probing mechanism but not the new : style resource management. I think a driver should be moved over : entirely to the new code before it can be said to have been newbusified. True, but there is a small matter of only having so many hours in the day. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Fri Apr 7 12: 9:53 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id A5A7E37C09C for ; Fri, 7 Apr 2000 12:09:48 -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 NAA07047; Fri, 7 Apr 2000 13:09:47 -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 NAA01432; Fri, 7 Apr 2000 13:08:55 -0600 (MDT) Message-Id: <200004071908.NAA01432@harmony.village.org> Subject: Re: Driver source location Cc: Paul Richards , new-bus@FreeBSD.ORG In-reply-to: Your message of "Fri, 07 Apr 2000 13:07:57 MDT." <200004071907.NAA01401@harmony.village.org> References: <200004071907.NAA01401@harmony.village.org> <38EE2BFE.B696AD7@originative.co.uk> Date: Fri, 07 Apr 2000 13:08:55 -0600 From: Warner Losh Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200004071907.NAA01401@harmony.village.org> Warner Losh writes: : There's no need to have a separate file for the bus stuff. It is ^^^^ directory, I mean directory. : almost never large enough to warrant anything but its own file. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Fri Apr 7 14: 3:21 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from overcee.netplex.com.au (peter1.yahoo.com [208.48.107.4]) by hub.freebsd.org (Postfix) with ESMTP id 09EDE37C0D4 for ; Fri, 7 Apr 2000 14:03:19 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 9B9251CD7; Fri, 7 Apr 2000 14:03:17 -0700 (PDT) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: Warner Losh Cc: Nick Hibma , Paul Richards , new-bus@FreeBSD.ORG Subject: Re: Driver source location In-Reply-To: Message from Warner Losh of "Fri, 07 Apr 2000 13:04:04 MDT." <200004071904.NAA01361@harmony.village.org> Date: Fri, 07 Apr 2000 14:03:17 -0700 From: Peter Wemm Message-Id: <20000407210317.9B9251CD7@overcee.netplex.com.au> Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote: > In message Nick Hibma wri tes: > : You don't have. There are modules that have their .c files in the > : /sys/modules direcotry. > : > : find /sys/modules -name \*.c > : > : is your friend. :-) > > But I thought we weren't supposed to put source that wasn't Makefiles > into /sys/modules. The syscons and splash files *.c are bugs. I have been complaining about them for some time. I've never been able to get a clear answer as to whether they were irreparibly i386 specific or just vga specific (and might one day be able to be made work on a vga card on an alpha for example). Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message From owner-freebsd-new-bus Sat Apr 8 17:32:31 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id D3B2C37B5A1 for ; Sat, 8 Apr 2000 17:32:29 -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 SAA13859 for ; Sat, 8 Apr 2000 18:32:28 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: (from imp@localhost) by harmony.village.org (8.9.3/8.8.3) id SAA24084 for new-bus@freebsd.org; Sat, 8 Apr 2000 18:32:27 -0600 (MDT) Date: Sat, 8 Apr 2000 18:32:27 -0600 (MDT) From: Warner Losh Message-Id: <200004090032.SAA24084@harmony.village.org> To: new-bus@freebsd.org Subject: How dow you... Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ... get some memory. I need to get some memory. It needs to be in the ISA hole, but I don't care where, just something that's not in use, 4k in size and aligned to 4k. I know how to do the last clause of that, but not the rest. Ideas? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message