From owner-freebsd-current@FreeBSD.ORG Tue Nov 23 19:20:36 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BA0016A511 for ; Tue, 23 Nov 2004 19:20:36 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F31E43D64 for ; Tue, 23 Nov 2004 19:20:20 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 11424 invoked from network); 23 Nov 2004 19:20:18 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Nov 2004 19:20:18 -0000 Received: from [10.50.41.235] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id iANJJnrX036800; Tue, 23 Nov 2004 14:20:13 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-current@FreeBSD.org Date: Tue, 23 Nov 2004 13:43:22 -0500 User-Agent: KMail/1.6.2 References: <200411231226.38172.jkim@niksun.com> In-Reply-To: <200411231226.38172.jkim@niksun.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200411231343.22760.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Jung-uk Kim Subject: Re: Transparent bridges (a. k. a. HUB-to-PCI bridges)? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 19:20:36 -0000 On Tuesday 23 November 2004 12:26 pm, Jung-uk Kim wrote: > While I was booting Linux, I saw a 'transparent bridge' from dmesg and > started digging up because I was fighting against 'interrupt > storming' and 'stray IRQ' problems with the latest Intel chipsets > recently and I had a feeling that it's somehow related. > > http://lxr.linux.no/source/drivers/pci/probe.c?v=2.6.8.1#L195 > http://lxr.linux.no/source/arch/i386/pci/fixup.c?v=2.6.8.1#L192 > http://lxr.linux.no/source/arch/i386/pci/irq.c?v=2.6.8.1#L870 > http://lxr.linux.no/source/arch/i386/pci/irq.c?v=2.6.8.1#L1017 > > But I don't see any special treatment in FreeBSD's PCI driver. > > 1. Is this relevant for FreeBSD? > 2. Is this related to the problems (esp. SMP)? First of all, I have no idea what type of interrupt routing problems you are having, but as for the above: FreeBSD uses a much simpler way of managing PCI interrupt routing. In FreeBSD, each hardware device (including PCI bridges (whether Host-PCI or PCI-PCI) and PCI busses) have an OOPish device object (device_t) associated with them. You can see the tree structure via 'devinfo'. The way FreeBSD implements interrupt routing is that each PCI bridge driver provides a method for determining the IRQ associated with a given bus/device/pin tuple. (The bus is implicit since each bridge only handles requests for its immediate downstream bus.) In order to make use of the several different ways of determining interrupt routing, there are several different PCI bridge drivers for both Host-PCI and PCI-PCI bridges. For example, there are ACPI Host-PCI and PCI-PCI bridge drivers that will route interrupts using the _PRT table objects provided by ACPI for busses in ACPI's namespace. Also, there are PCIBIOS bridge drivers to handle routing for the non-ACPI non-APIC case using the information in the $PIR table. Similarly, for the non-ACPI APIC case, there are MP Table bridge drivers to route interrupts for busses that are listed in the MP Table. If a PCI-PCI bridge is not enumerated in ACPI space on an ACPI system or is not listed in either the $PIR (non-APIC) or MP Table (APIC) on a non-ACPI system, then the bridge will be probed via the simple PCI-PCI bridge driver which does the standard barber-pole swizzle to route interrupts based off the intpins on the bridge device's upstream connection. Thus, for "transparent" bridges not listed in the MP Table, the MP Table driver won't attach and it will fall back to the simple PCI-PCI bridge driver and just work. Now, back to your original problem: what type of interrupt problems are you having? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org