From owner-freebsd-sparc64@FreeBSD.ORG Fri Jun 13 09:01:25 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E42EF37B40D for ; Fri, 13 Jun 2003 09:01:24 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id E554443FCB for ; Fri, 13 Jun 2003 09:01:20 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 15261 invoked by uid 65534); 13 Jun 2003 16:01:19 -0000 Received: from p508E6807.dip.t-dialin.net (EHLO galatea.local) (80.142.104.7) by mail.gmx.net (mp016) with SMTP; 13 Jun 2003 18:01:19 +0200 Received: from tmm by galatea.local with local (Exim 4.20 #1) id 19Qqzl-0001E6-9m for ; Fri, 13 Jun 2003 18:01:41 +0200 Date: Fri, 13 Jun 2003 18:01:41 +0200 From: Thomas Moestl To: freebsd-sparc64@freebsd.org Message-ID: <20030613160140.GE658@crow.dom2ip.de> Mail-Followup-To: freebsd-sparc64@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Sender: Thomas Moestl Subject: TESTERS NEEDED: new OFW PCI code X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2003 16:01:26 -0000 Hi, I've finished implementing the long-promised new OFW PCI code; the patch is available at http://people.freebsd.org/~tmm/ofw-newpci.diff It would be very nice if people could test this on different types of sparc64 PCI machines, espcially those with more exotic firmware properties such as Ultra 30, e450 and Netra t1, and ones with the apb PCI-PCI bridge. To do so, please apply the patch, and add the new option OFW_NEWPCI to your configuration (and, to make debugging easier, OFW_PCI_DEBUG and PSYCHO_DEBUG). Test reports for kernels with the patch applied, but without OFW_NEWPCI are also very welcome, since some of the old code has also been changed. WARNING: Please be aware that device enumeration may have changed on your box with that option, so you might need to do some reconfiguration to make the system boot properly (like changing device names in your fstab and exchanging the configuration of network interfaces). You might not even be able to boot without correcting the boot device on the rootmount prompt if you've got multiple disk controllers with disks attached to more than one. I plan to commit this as soon as I'm reasonably convinced that it works on most boxen. It will still be conditional on OFW_NEWPCI then for a while, since the enumeration changes could cause major upgrade pains. I'll see how to go about making it the default later; I want to kick out the old code as soon as possible :) The advantages of the new approach are: - Odd devices (like the gem(4)s, hme(4)s etc. without function 0 in the firmware) should just work now. - Device enumeration should hopefully be more like on Solaris now, so unit numbers should match what's printed on the box more closely. - Real interrupt routing is implemented now, so cardbus bridges etc. have at least a chance to work. - The quirk tables are gone and have been replaced by (hopefully sufficient) heuristics. - Much cleaner code. For the interested, the changes are: - Introduce an OFW PCI bus driver; it inherits most methods from the generic PCI bus driver, but uses the firmware for enumeration, performs additional initialization for devices and performs firmware-specific interrupt routing in a stub alloc_resource method. It also implements an OFW-specific method to allow child devices to get their firmware nodes. - Introduce an OFW PCI-PCI bridge driver; again, it inherits most of the generic PCI-PCI bridge driver; it has it's own method for interrupt routing, as well as some sparc64-specific methods (one to get the node again, and one to adjust the bridge bus range, since we need to reenumerate all PCI buses). - Convert the apb driver to the new way of handling things - Provide a common framework for OFW bridge drivers, used be the two drivers above. - Provide a small common framework for interrupt routing (for all bridge types). - Convert the psycho driver to the new framework; this gets rid of a bunch of old kludges in pci_read_config(), and the whole preinitialization (ofw_pci_init()). - Convert the ISA MD part and the EBus driver to the new way interrupts and nodes are handled. - Correct bogus intpin settings in the driver (and allow PCI devices to use pci_set_intpin() to make this possible). - Introduce types for firmware interrupt properties. - Rename the old sparcbus_if to ofw_pci_if (it is only required for PCI), and move it to a more correct location (new support methods were also added, and an old one was deprecated). - Fix a bunch of minor bugs, perform some cleanups. In some cases, I introduced some minor code duplication to keep the new code clean, in hopes that the old code will be unifdef'ed soon. Thanks, - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C