From owner-freebsd-arch@FreeBSD.ORG Thu Feb 26 10:27:12 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5329B16A4CE for ; Thu, 26 Feb 2004 10:27:12 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id D673943D3F for ; Thu, 26 Feb 2004 10:27:11 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i1QIR9kj080206; Thu, 26 Feb 2004 11:27:09 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 26 Feb 2004 11:26:31 -0700 (MST) Message-Id: <20040226.112631.45877306.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: arch@freebsd.org Subject: Re: per-device sysctls X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2004 18:27:12 -0000 In message: des@des.no (Dag-Erling Sm=F8rgrav) writes: : I also plan to add entries for device IDs, irq / : drq lines etc., but this will require additional bus-specific code an= d : is not yet implemented. You don't need bus specific code for any of these things, per se. There's already two routines that busses can (and mostly do) implement. The irq/drq/resource stuff is already recorded elsewhere and can be dug out, just like devinfo does. The existing interface to get location and pnpinfo from the bus are: # # Returns the pnp info for this device. Return it as a string. If the= # string is insufficient for the storage, then return EOVERFLOW. # METHOD int child_pnpinfo_str { device_t _dev; device_t _child; char *_buf; size_t _buflen; }; # # Returns the location for this device. Return it as a string. If the= # string is insufficient for the storage, then return EOVERFLOW. # METHOD int child_location_str { device_t _dev; device_t _child; char *_buf; size_t _buflen; }; Warner