From owner-freebsd-new-bus Fri Aug 30 22:10:40 2002 Delivered-To: freebsd-new-bus@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 859A637B400 for ; Fri, 30 Aug 2002 22:10:37 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F86C43E4A for ; Fri, 30 Aug 2002 22:10:37 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 25191 invoked from network); 31 Aug 2002 05:10:35 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 31 Aug 2002 05:10:35 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g7V5AYBQ050940; Sat, 31 Aug 2002 01:10:34 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020830.220723.10970697.imp@bsdimp.com> Date: Sat, 31 Aug 2002 01:10:36 -0400 (EDT) From: John Baldwin To: "M. Warner Losh" Subject: RE: ISA bus notes Cc: new-bus@FreeBSD.org Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 31-Aug-2002 M. Warner Losh wrote: > > If the system has ACPI: > attach acpi_isabus > else if the system has pnpbios > attach pnpbios_isabus > else > attach isabus > > Then call the attached isa bus' attach routine. If appropriate, > enumerate devices from the enumeration source. For acpi and pnpbios, > lists of devices come from those enumeration sources. Since this > information contains other information (such as IRQ, IOPORT, MEMORY, > etc), these resources can be set on the children that are added. Then > call the generic attach routine. The common code will then call any > of the children's drivers identify routines, as it does now. The PnP > ISA devices would then be added. Hints would then be added to the > mix. If a given 'hint ball' matches to a device (with the above set > resources), that device would be hard wired to that unit. Otherwise a > new child is added. After all this enumeration happens, then the pnp > isa devices are disabled. The children are then probed in the proper > order (sensitive devices, then normal devices). PnP ISA devices are > then re-enabled and the probe routines for them are called. > > I don't where winter's stuff fits into this... I've not done the > research here to know for sure. > > Other than that, I think that we're going to be in good shape without > hints on all but the most primitive machines (and lucky me, I have two > of these beasties still in service or hot-standby). > > This is a bit of a re-hash of John's post, but I wanted to make sure > that it was all summarized to make sure that we're not missing some > step or anything. > > Look good? Well, I think you are looking at it not quite from an OOP perspective. :) Try using the same model of overriding bus drivers that I use with ACPI and the PCI bus. Thus, instead of having the system try and know which kind of ISA bus to attach, you have three drivers for "isa": - acpi_isa (called "isa" though) whose probe routine only succeeds if it can read it's handle via ivars on itself. In all ACPI systems that I know of, we can handle this case fairly easily by providing an ACPI PCI-ISA bridge driver that adds ivar support for the child bus device like the ACPI PCI bus driver does; probe routine returns 0 on success - pnp_isa (again, "isa") whose probe routine only succeeds if PNPBIOS is detected. This probe routine can return -100 or some such. - isa (again, "isa") whose probe routine pretty much always succeeds and returns -1000 or some such This way, ISA busses become the right "flavor" of an ISA bus via normal probe/attach methods (i.e. we let the probe routines choose what type of ISA bus to use). I think we should leave the hint-device merging stuff until later as it requires to fix all the broken ISA drivers to get it right. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message