From owner-freebsd-current@FreeBSD.ORG Tue Jun 7 04:45:42 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 227A416A41C; Tue, 7 Jun 2005 04:45:42 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (berlin-qwest.village.org [168.103.84.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id E760243D1D; Tue, 7 Jun 2005 04:45:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j574iRmU090275; Mon, 6 Jun 2005 22:44:44 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 06 Jun 2005 22:45:13 -0600 (MDT) Message-Id: <20050606.224513.131763662.imp@bsdimp.com> To: fierykylin@gmail.com From: "M. Warner Losh" In-Reply-To: <87ab37ab050606211290c3220@mail.gmail.com> References: <87ab37ab05060108167dee1d6@mail.gmail.com> <20050605.110508.101566419.imp@bsdimp.com> <87ab37ab050606211290c3220@mail.gmail.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, freebsd-questions@freebsd.org Subject: Re: what is the init entrance for pci bus scan in FREEbsd? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Jun 2005 04:45:42 -0000 In message: <87ab37ab050606211290c3220@mail.gmail.com> kylin writes: : On 6/6/05, M. Warner Losh wrote: : > I'm not sure I understand what you are getting at here. First, devd : > already provides 95% of the infrastructure to do things when devices : > are added to the system. : sorry ,i ignore it!! it is really a lite tool:) ,but it seems that : /dev/devctl does not present the function to write to the devctl,then : I think it is impossible to give order to disable or enable the pci : slots without making changes. OK. You need a daemon to respond to the state diagram of the pci hot plug interaction model. : then it is devd that should come into play( like the sbin/hotplug in : linux?):) Yes. devd predates hotplug in Linux, but not by much (they both were worked on in parallel). : > Second, you assume that linux's way of doing things is how FreeBSD : > does things. This isn't the case. FreeBSD scans the bus at pci bus : > attach time and adds chilren nodes that it finds. In the Cardbus : > case, it will add nodes as the card bus bridge tells us of children, : > and then probe/attaches them. : i mean the enumeration way . and the trickes to talk with the hotplug bridge. : BTW pci_init() is the start point for PCI enumeration in linux. The : way to add the device to the lists You'll need to look at how cardbus handles this. : > Finally, you should send me your work for review. I've been keen on : > expanding pci bus support for a long time and would be happy to review : > such changes. : : > BTW, Which chipsets and hotplugging methods do you support? : i will begin with the fake way here ,then give support to pciexpress : native hotplug .there is common register interface for pci e hotplug : first ,i will not change the source ,just add a module. I think you should make it be a full-fledged driver, rather than an add-on on the side. You'll not be able to solve the resource problems otherwise. Warner