From owner-freebsd-new-bus Fri Sep 6 9:55: 4 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 1747D37B400 for ; Fri, 6 Sep 2002 09:55:01 -0700 (PDT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5C6C43E6A for ; Fri, 6 Sep 2002 09:55:00 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 5312 invoked from network); 6 Sep 2002 16:54:58 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 6 Sep 2002 16:54:58 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g86GsoBv015180; Fri, 6 Sep 2002 12:54:54 -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 Date: Fri, 06 Sep 2002 12:54:50 -0400 (EDT) From: John Baldwin To: new-bus@FreeBSD.org, gibbs@FreeBSD.org Subject: The duplicate host-PCI bridge thing 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 I have a solution for the problem of the nexus probing Host-PCI bridges already found by ACPI. It does make the assumption that ACPI enumerates all Host-PCI bridges though. If we ever find that is not the case then we may have to add hacks for that case. Basically what I did was to create a 'legacy' driver. In nexus_attach(), if acpi0 isn't found, then the nexus adds a "legacy0" child. The nexus_pcib and apm drivers now hang off of legacy instead of ACPI. This also means that the gross hacks to keep APM and ACPI from stomping on each other aren't needed anymore either. The code to do this can be found in the jhb_acpipci branch from the p4 depot on freefall (//depot/users/jhb/acpipci/...). I can also post patches if desired. I have a few other changes in that branch as well including fixes to make PCI interrupt routing using the $PIR work for child busses. I want to go ahead and get the stuff in this branch committed so I can start working on fixing the APIC_IO mess for PCI interrupts. Basically, we do a psuedo-routing hack in pci_cfgregread() right now. What I plan to do instead is to remove that and instead add a PCI-PCI bridge driver that uses the mptable to route interrupts (similar to my current PCIBIOS PCI-PCI bridge driver) and have nexus_pcib (which will be renamed to legacy_pcib after the legacy driver is added) use either method of routing depending on #ifdef APIC_IO (it could eventually be a runtime decision, but that is another ball of wax). ACPI already routes interrupts right for APIC's, but the pci_cfgregread() hack breaks it. What we will do instead is to always route interrupts on i386 (just like we always do on ia64) and between the ACPI routing and the mptable routing for legacy systems we should get it right for APIC's. We might even be able to look at making APIC's work on UP systems at some point. -- 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