From owner-freebsd-current@FreeBSD.ORG Thu Feb 6 19:54:06 2014 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94332A87; Thu, 6 Feb 2014 19:54:06 +0000 (UTC) Received: from mail-vc0-x235.google.com (mail-vc0-x235.google.com [IPv6:2607:f8b0:400c:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 388731DFE; Thu, 6 Feb 2014 19:54:06 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id ie18so1813453vcb.40 for ; Thu, 06 Feb 2014 11:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=c7UnbTUKkGRNKTA3kyROU8N7URLcT2UxFy3fChwzXMw=; b=QCw85RsV4r5kKRt31SsaaaBPPPYJqXFyz88aA20D2BvHCUf2rySx57PfFum7YDZCPP ImOXPWSmtNZK3aWyISgBu37mWDqihkr8/bQ+UQaBevBC232bFd1c4p8YiAV1mRjODRvK 0KS2cyhFdiH+8ePQ3yJ6CNK4FAdg08lreN/T4yarSsfwxy5LKoekJ2dRXVLeoTvb0lPk OV1ob/SdHhg7GUTSzvWpSYNyzIncKBH1Z5ztjJzhPMtSQPtyhwi8mg6K5Lg2p7WoHP8A IplAnHEWvjER6cusJcuY03QX6MviSsqKP3yb/xkcK9DB2ZYs5z4E1v/nLpySlIYK3R/a 2goA== MIME-Version: 1.0 X-Received: by 10.53.0.230 with SMTP id bb6mr1595372vdd.39.1391716445396; Thu, 06 Feb 2014 11:54:05 -0800 (PST) Received: by 10.220.168.135 with HTTP; Thu, 6 Feb 2014 11:54:05 -0800 (PST) In-Reply-To: References: <201402061437.53355.jhb@freebsd.org> Date: Thu, 6 Feb 2014 14:54:05 -0500 Message-ID: Subject: Re: [PATCH] PCI bus number management From: Thomas Hoffmann To: current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 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: Thu, 06 Feb 2014 19:54:06 -0000 On Thu, Feb 6, 2014 at 2:47 PM, Thomas Hoffmann wrote: > On Thu, Feb 6, 2014 at 2:37 PM, John Baldwin wrote: > >> I have a patch to teach the PCI bus code and PCI-PCI bridge driver to >> manage >> PCI bus numbers. The approach is somewhat similar to how NEW_PCIB >> manages I/O >> windows for briges. Each bridge creates an rman to manage the bus >> numbers for >> all buses and bridges that live below it. Each bus allocates a bus >> resource >> from its parent bridge, and child bridges allocate their ranges from their >> parent devices. At the "top" of the PCI tree, the Host-PCI bridges >> allocate >> their respective bus ranges from their PCI domain/segment. There isn't >> really >> a device node for PCI domains, so I created a helper API that basically >> auto- >> creates a PCI bus rman for each domain on first use and then sub-allocates >> from that for Host-PCI bridges. >> >> The current patch (with some extra debugging) is at >> http://people.FreeBSD.org/~jhb/patches/pci_bus_rman.3.patch >> >> I would like to commit this to HEAD soon but thought I would post it for >> some >> pre-commit testing for the brave. :) If you are really brave, try booting >> with 'hw.pci.clear_buses=1' which will force the kernel to renumber all >> buses >> in the system. If you are really, really brave, try booting with >> 'hw.pci.clear_bars=1', 'hw.pci.clear_buses=1', and 'hw.pci.clear_pcib=1'. >> (My >> laptop survives with all those set) >> >> Note that the patch only enables bus number management on amd64 and i386. >> I >> believe ia64 just needs to define PCI_RES_BUS for this to work since it >> mandates ACPI. Porting this to other platforms requires handling >> PCI_RES_BUS >> rseources for Host-PCI bridges in bus_alloc_resource(), >> bus_adjust_resource(), >> and bus_release_resource(). >> >> -- >> John Baldwin >> > > I get a "404 - Not Found" trying to follow the link. > Got it by backing up one level on the link and selecting form the list.