From owner-freebsd-ppc@FreeBSD.ORG Mon Feb 1 14:49:53 2010 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376271065697; Mon, 1 Feb 2010 14:49:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0929E8FC14; Mon, 1 Feb 2010 14:49:53 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B812F46B2C; Mon, 1 Feb 2010 09:49:52 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id E643A8A021; Mon, 1 Feb 2010 09:49:51 -0500 (EST) From: John Baldwin To: freebsd-ia32@freebsd.org Date: Mon, 1 Feb 2010 09:35:38 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <8506939B503B404A84BBB12293FC45F60681AA1B@emailbng3.jnpr.net> In-Reply-To: <8506939B503B404A84BBB12293FC45F60681AA1B@emailbng3.jnpr.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002010935.38861.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 01 Feb 2010 09:49:51 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.3 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-ppc@freebsd.org, freebsd-arch@freebsd.org Subject: Re: About hot-plugging support in FreeBSD X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 14:49:53 -0000 On Monday 01 February 2010 1:26:00 am Rajat Jain wrote: > Hi, > > I'm a newbie to the FreeBSD and have come from Linux background, hence > please pardon me if this is not the right list for my questions, and > please point me to the correct list: > > 1) Does FreeBSD support PCI-Express hot-plugging? I could not even find > any instances in the source code that suggest that even PCI hot-plugging > is supported. Is it supported? Can you please point me to appropriate > references in the code? No, not currently. > 2) How and WHERE in the code is the "PCI Enumeration" and the "PCI > resource allocation" done?: Enumeration is done in 'pci_add_children()' in sys/dev/pci/pci.c. Resource allocation is done in the same file in a few different places. > 2a) Does FreeBSD does its own PCI resource allocation / PCI bus > numbering, or does it simply use the one already done by the BIOS / > bootloader? It reuses the firmware allocations and can only handle simple cases to allocate resources for a BAR that the firmware did not initialize. > 2b) In case it does its own PCI resource management, is the PCI > Enumeration done only at the boot time, or devices can be detected and > added later at run-time as well? [Please note that for adding at run > time, we'll need certain PCI resource pre-reserved in anticipation of > any new devices] It shouldn't be too hard to support hot-plug. Note that the cardbus(4) code already does a form of PCI hot-plug, so some of the infrastructure for PCI hot-plug is already in place. -- John Baldwin