From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 21:05:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E4B816A420 for ; Sat, 5 Nov 2005 21:05:55 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 596FE43D46 for ; Sat, 5 Nov 2005 21:05:54 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA5L3qlF045899; Sat, 5 Nov 2005 14:03:52 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 05 Nov 2005 14:04:16 -0700 (MST) Message-Id: <20051105.140416.69987626.imp@bsdimp.com> To: fierykylin@gmail.com From: "M. Warner Losh" In-Reply-To: <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> References: <87ab37ab0511032030o134b9316j83295dd303e4e44b@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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 05 Nov 2005 14:03:52 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: misc questions about the device&driver arch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 21:05:55 -0000 In message: <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> kylin writes: : /////////////// : pci bridge dynamic resize : ///////////// : it seems that the device arch of freebsd is similar to what is revealed in : window OS. i have read the pcie hotplug tps of windows longhorn ,it is said : that with some hardware mechanisms the pci bridge driver can do global pci : resource window reconfiguration.so good to the hotplugin pci device for it : avoid prelocating resource for the device . : i wonder ,if the mem /io/irq reconfiguration possible under freebsd .:) : 1 Yes. Cardbus does it all the time. However, there's no pcie hot-plug support yet, so the process for kicking off configuration of the new device doesn't happen. : ////////////// : is bus_data_generation : ///////// : what idoes bus_data_generation for, is it the generation count for the : device manager tree? : void : bus_data_generation_update(void) : { : bus_data_generation++; : } Anytime the device_t tree changes, this gets updated. It is used by devinfo and friends. : ////////////// : pci_write_config vs pci_write_config_method : ////////////// : under the source code /dev/pci .there are functions name pci_write_config ( : pcivar.h) and pci_write_config_method(pci.c) : they both call the parent method ,though the content is different ,but does : that a liitle overlap whit each other? pci_write_config is the user's interface. This gets translated into a series of calls up the tree using pci_write_config_method to find the right place in the tree to actually write to the configuration registers. Warner