From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 27 23:43:15 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 D018816A420; Sun, 27 Nov 2005 23:43:15 +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 3381643D75; Sun, 27 Nov 2005 23:43:11 +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 jARNdh2S052892; Sun, 27 Nov 2005 16:39:43 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 27 Nov 2005 16:40:01 -0700 (MST) Message-Id: <20051127.164001.61158282.imp@bsdimp.com> To: fierykylin@gmail.com From: "M. Warner Losh" In-Reply-To: <87ab37ab0511261855lfc5d062h7d394f25bcd00ec0@mail.gmail.com> References: <87ab37ab0511261855lfc5d062h7d394f25bcd00ec0@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]); Sun, 27 Nov 2005 16:39:43 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: 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 23:43:16 -0000 In message: <87ab37ab0511261855lfc5d062h7d394f25bcd00ec0@mail.gmail.com> kylin writes: : i can use pciconf in freebsd to list the pci device ,but how to list : the device tree in freeebsd? devinfo -v : 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 devclass is the information about all instances of the device. device_t is an instance of the device. The only difference between a bus and a device is that a bus has children. Warner