From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 27 02:56:28 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 CF59116A44A for ; Sun, 27 Nov 2005 02:56:27 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D64E43D5E for ; Sun, 27 Nov 2005 02:55:58 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so712610wxc for ; Sat, 26 Nov 2005 18:55:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=qRWG4QKcJ/QMEMwc7F8Iqm1ImxCh0T85wL7SzUzdO1xsoZsMD3pVHnITZB8lVj5haaQPfj0i5sbWU41B9FRhMCtGlPX2u/ZXHUadH4poZc79gl7s9PXpTmf7hDZRultbRA4E9SVyp4f9YtRte3nWHF1aBKHs9JLNNExyzLX0f3o= Received: by 10.70.15.17 with SMTP id 17mr7989897wxo; Sat, 26 Nov 2005 18:55:55 -0800 (PST) Received: by 10.70.18.16 with HTTP; Sat, 26 Nov 2005 18:55:55 -0800 (PST) Message-ID: <87ab37ab0511261855lfc5d062h7d394f25bcd00ec0@mail.gmail.com> Date: Sun, 27 Nov 2005 10:55:55 +0800 From: kylin To: freebsd-questions@freebsd.org, "freebsd-hackers@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: to list all the devices in freebsd &definition analyse 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: Sun, 27 Nov 2005 02:56:29 -0000 I i can use pciconf in freebsd to list the pci device ,but how to list the device tree in freeebsd? II i got some anornymous definition on devclass driver and device that differ from the current man page i think they seems reasonable but how can devclass Represents a bus or leaf device driver while driver still Represents a bus or leaf-level end-device driver ? and device is just a instance of bus or (leaf) end-device.?? is it oop? can the disigner of the arch show us a word?:) devclass Represents a bus or leaf device driver, e.g. pci_devclass (PCI bus), ahc_devclass (Adaptec SCSI host-bus adapter). It contains a list of drivers that belong to it. At run-time it also has a list populated by device instances of this class indexed by unit numbers. driver Represents a bus or leaf-level end-device driver. Each driver forms a devclass. All drivers are attached to single parent devclass (with the exception of root_devclass). Drivers have list of methods/operations e.g. probe/attach that are also inherited by it's instance devices. device Represents an instance of bus or (leaf) end-device. All devices have unique unit numbers in class to which they belong. Each device has one parent and may have a list of children. Devices inherit their operations and class from driver to which they belong. Device can be in any of the states as defined in device_state_t below -- we who r about to die,salute u!