From owner-freebsd-current@FreeBSD.ORG Tue Nov 23 18:36:32 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 3662716A4CE for ; Tue, 23 Nov 2004 18:36:32 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5796043D41 for ; Tue, 23 Nov 2004 18:36:31 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id iANIYCGn039662; Tue, 23 Nov 2004 11:34:13 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 23 Nov 2004 11:34:52 -0700 (MST) Message-Id: <20041123.113452.85414512.imp@bsdimp.com> To: jkim@niksun.com From: "M. Warner Losh" In-Reply-To: <200411231226.38172.jkim@niksun.com> References: <200411231226.38172.jkim@niksun.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org 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 18:36:32 -0000 In message: <200411231226.38172.jkim@niksun.com> Jung-uk Kim writes: : 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 We do exactly this already in our pci pci bridge code. We allow allocation for all subresources appropriately. From see the PCIB_SUBTRACTIVE if statements in pcib_alloc_resource. : http://lxr.linux.no/source/arch/i386/pci/fixup.c?v=2.6.8.1#L192 We detect fixups correctly here. There's also some toshiba parts that we detect as well. From pci_pci.c: /* * Intel 815, 845 and other chipsets say they are PCI-PCI bridges, * but have a ProgIF of 0x80. The 82801 family (AA, AB, BAM/CAM, * BA/CA/DB and E) PCI bridges are HUB-PCI bridges, in Intelese. * This means they act as if they were subtractively decoding * bridges and pass all transactions. Mark them and real ProgIf 1 * parts as subtractive. */ if ((pci_get_devid(dev) & 0xff00ffff) == 0x24008086 || pci_read_config(dev, PCIR_PROGIF, 1) == 1) sc->flags |= PCIB_SUBTRACTIVE; : 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 We already do the right kinds of dances for ioapic connected busses, and other busses that have table driven needs (eg pci $PIR and ACPI related stuff). Check out the legacy pci driver and the acpi_pci drivers for details. : But I don't see any special treatment in FreeBSD's PCI driver. I sure do. : 1. Is this relevant for FreeBSD? Yes. We already have the relevant code. : 2. Is this related to the problems (esp. SMP)? I doubt it. Warner