From owner-freebsd-current@FreeBSD.ORG Tue Jan 20 14:34:21 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 6F1B616A4CE for ; Tue, 20 Jan 2004 14:34:21 -0800 (PST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AA3543D5A for ; Tue, 20 Jan 2004 14:34:05 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 11448 invoked from network); 20 Jan 2004 22:34:04 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 20 Jan 2004 22:34:04 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i0KMY0M0015071 for ; Tue, 20 Jan 2004 17:34:01 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: current@FreeBSD.org Date: Tue, 20 Jan 2004 17:18:23 -0500 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401201718.23458.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: [PATCH] Reworked $PIR support for non-ACPI non-APIC PCI interrupt routing 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, 20 Jan 2004 22:34:21 -0000 On i386, when we don't use ACPI and don't have an APIC, we use the $PIR table from the BIOS to route interrupts. I have rewritten the $PIR support to be more link-centric somewhat similar to the ACPI PCI link code. Part of this has included a tweak to the 'virgin' interrupt algorithm. It will now first try to use IRQ's that the BIOS has already used for other PCI devices when trying to pick a virgin IRQ. So, if you had PCI devices routed to IRQ 3 or 4 before, this should fix that. It also allows you to use hints to override the IRQ for a given link like so: hint.pci.link.0x6a.irq=10 Would set the IRQ to 10 for link 0x6a. If you want to route an interrupt for a given PCI device, look up that device in the $PIR output in the dmesg, find the associated link device and set a tunable for that link. Patch is at http://www.FreeBSD.org/~jhb/patches/pir.patch -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org