From owner-freebsd-ia32@FreeBSD.ORG Mon Feb 1 06:38:19 2010 Return-Path: Delivered-To: freebsd-ia32@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61215106566C; Mon, 1 Feb 2010 06:38:19 +0000 (UTC) (envelope-from rajatjain@juniper.net) Received: from exprod7og125.obsmtp.com (exprod7og125.obsmtp.com [64.18.2.28]) by mx1.freebsd.org (Postfix) with ESMTP id C05238FC13; Mon, 1 Feb 2010 06:38:18 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob125.postini.com ([64.18.6.12]) with SMTP ID DSNKS2Z22lu7BcDKgCNj5sQohlOJ57a+0J/F@postini.com; Sun, 31 Jan 2010 22:38:18 PST Received: from gaugeboson.jnpr.net (10.209.194.17) by P-EMHUB01-HQ.jnpr.net (172.24.192.35) with Microsoft SMTP Server id 8.1.393.1; Sun, 31 Jan 2010 22:26:04 -0800 Received: from emailbng3.jnpr.net ([10.209.194.27]) by gaugeboson.jnpr.net with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Feb 2010 11:56:01 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 1 Feb 2010 11:56:00 +0530 Message-ID: <8506939B503B404A84BBB12293FC45F60681AA1B@emailbng3.jnpr.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: About hot-plugging support in FreeBSD Thread-Index: AcqjB2wYr4V2eolETBattuBEzcaY7Q== From: Rajat Jain To: X-OriginalArrivalTime: 01 Feb 2010 06:26:01.0658 (UTC) FILETIME=[6CA8C9A0:01CAA307] Cc: freebsd-ia32@freebsd.org, freebsd-ppc@freebsd.org Subject: About hot-plugging support in FreeBSD X-BeenThere: freebsd-ia32@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD on the IA-32 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2010 06:38:19 -0000 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:=20 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? >From the links below it seems, that the PCI hot-plug is definitely in the roadmap, but it seems that it is a distant target? http://wiki.freebsd.org/PCIHotplug http://www.freebsd.org/projects/ideas/ideas.html#p-pcihotplug Is work already being done on this? Is some limited support available? 2) How and WHERE in the code is the "PCI Enumeration" and the "PCI resource allocation" done?: 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? 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] I'd appreciate if you could provide me any pointers... Thanks, Rajat From owner-freebsd-ia32@FreeBSD.ORG Mon Feb 1 14:49:53 2010 Return-Path: Delivered-To: freebsd-ia32@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-ia32@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD on the IA-32 platform 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