From owner-freebsd-current@FreeBSD.ORG Fri Jan 2 13:30:51 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 0852C16A4CF for ; Fri, 2 Jan 2004 13:30:51 -0800 (PST) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3C9D43D4C for ; Fri, 2 Jan 2004 13:30:47 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 17543 invoked from network); 2 Jan 2004 21:30:47 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 2 Jan 2004 21:30:47 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i02LUgM0003778; Fri, 2 Jan 2004 16:30:42 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20040102195244.GE17023@cicely12.cicely.de> Date: Fri, 02 Jan 2004 16:30:44 -0500 (EST) From: John Baldwin To: ticso@cicely.de X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: Bernd Walter cc: current@FreeBSD.org Subject: Re: Still IRQ routing problems with bridged devices. 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: Fri, 02 Jan 2004 21:30:51 -0000 On 02-Jan-2004 Bernd Walter wrote: > On Fri, Jan 02, 2004 at 02:19:53PM -0500, John Baldwin wrote: >> >> On 01-Jan-2004 Bernd Walter wrote: >> > On Thu, Jan 01, 2004 at 10:12:23AM -0700, M. Warner Losh wrote: >> >> In message: <20040101155100.GF11668@cicely12.cicely.de> >> >> Bernd Walter writes: >> >> : On Wed, Dec 31, 2003 at 10:22:30PM -0700, M. Warner Losh wrote: >> >> : > In message: <20040101013224.GC11668@cicely12.cicely.de> >> >> : > Bernd Walter writes: >> >> : > : The board is an old Asus T2P4 with 3 bridged cards and $PIR table. >> >> : > : All IRQs behind bridges get bogusly IRQ4 instead of the right ones. >> >> : > : Is this only a problem on some boards or do we have a general irq >> >> : > : routing problem with bridges? >> >> : > >> >> : > It is a problem with some bridges and PCI BIOS interrupt routing. >> >> : >> >> : The intline registers are correct - that's what used to run since years. >> >> : What has the kind of bridge to do with it? >> >> >> >> just what the code does :-) >> > >> > But bridges are handled generic so why would only some bridges show >> > this problem? >> > The bridges are 21050 types btw. >> >> Sounds like a BIOS bug. If a bridge isn't listed in the $PIR, we >> use the barber-pole swizzle to route across it. However, that is > > It can't know about my bridges because all of them are on cards and > they wouldn't won't fit with just 7 entries. Ok, if they are on cards, that is correct. >> technically only defined for bridges on add-in cards. The only >> way we can tell if a bridge is on an add-in card is if it is not >> listed either in ACPI's namespace with a _PRT or it is not listed >> in the $PIR. Part of teh problem is that we shouldn't be using > > It's not that simple. > The chips behind the bridges are layed out to all use INTA on the > primary bus, but INTA is correctly routed for non-bridged cards. > I have no clue about $PIR and therefor have no idea where irq4 comes > from - any pointer to $PIR documents are welcome. Erm, according to the PCI spec, the devices behind the bridges on the add-in cards will swizzle their interrupts. Thus, device 8.0 will use INTA on the add-in card's connect, 9.0 will use INTB for its INTA, etc. We use the $PIR to then figure out what IRQ to use for INT[ABCD] on that slot as appropriate. Thus, it would work something like this: 1) device 1.8.0 wants to route INTA so it asks the bridge for the IRQ 2) the bridges translates that into INTA on itself, and asks its parent for a route to INTA at its slot (say 0.2.0). 3) the host bridge lookes up 0.2.0 INTA in the $PIR, chooses an IRQ from the possible list (defaults to just using first IRQ) and returns it. This step should be skipping IRQ 4 adn using IRQ 10 or 11 instead For device 1.9.0, the bridge translates that into 0.2.0 INTB. Hope that makes sense. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/