From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 10 19:47:57 2006 Return-Path: X-Original-To: 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 5F1F916A400 for ; Mon, 10 Apr 2006 19:47:57 +0000 (UTC) (envelope-from bms@spc.org) Received: from mindfull.spc.org (mindfull.spc.org [83.167.185.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0C3643D53 for ; Mon, 10 Apr 2006 19:47:56 +0000 (GMT) (envelope-from bms@spc.org) Received: from arginine.spc.org ([83.167.185.2]) by mindfull.spc.org with esmtps (TLSv1:AES256-SHA:256) (Exim 4.52) id 1FT2MW-0005me-1J; Mon, 10 Apr 2006 20:47:48 +0100 Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 0386465499; Mon, 10 Apr 2006 20:47:48 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 74910-04-2; Mon, 10 Apr 2006 20:47:46 +0100 (BST) Received: by arginine.spc.org (Postfix, from userid 1078) id D102C653F9; Mon, 10 Apr 2006 20:47:46 +0100 (BST) Date: Mon, 10 Apr 2006 20:47:46 +0100 From: Bruce M Simpson To: "M. Warner Losh" Message-ID: <20060410194746.GY80492@spc.org> References: <44383346.2030207@samsco.org> <17464.16087.217524.843667@bhuda.mired.org> <20060409090757.GW80492@spc.org> <20060409.184825.99254285.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060409.184825.99254285.imp@bsdimp.com> User-Agent: Mutt/1.4.1i Organization: Incunabulum X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - mindfull.spc.org X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - spc.org X-Source: X-Source-Args: X-Source-Dir: Cc: mwm-keyword-freebsdhackers.102a7e@mired.org, scottl@samsco.org, ceri@submonkey.net, hackers@freebsd.org Subject: Re: Using any network interface whatsoever 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: Mon, 10 Apr 2006 19:47:57 -0000 On Sun, Apr 09, 2006 at 06:48:25PM -0600, M. Warner Losh wrote: > I though thtis was already supported. We export bus/slot/function > information devd, which can be used to configure the device. If I've read the specs or code incorrectly please do let me know -- my reading here is based on the PCI code as I understand it to be. As I understand things, the bus/slot/function numbers in pci(9), the *slot* number isn't guaranteed to have any meaning in geographic reality; it's purely what the PCI logic thinks the bus topology looks like and hence what the device numbers are. See BUGS in pci(9). It won't tell you that a given card is in a given slot with any degree of certainty or consistency across the range of backplanes available from multiple vendors -- although people may like to give PICMG a try as I hear such boards are consistent about such things. In the old Microsoft-specified $PIR tables there was a column which allowed you to map the bus/device/function tuple we use to a physical slot number, but this only ran 1-6. With multiple PCI buses and slot types, as well as multifunction devices, this information quickly became unusable and unreliable, although src/tools/tools/pirtool will happily display this information. ACPI as you no doubt know does away with the $PIR tables, although many BIOS still export them to allow legacy DOS programs which use PCI to work. There is an extension to ACPI which adds geographical slot addressing to the device tree but I haven't seen any systems which support it. Regards, BMS P.S. I have some notes somewhere about the ACPI geog stuff but can't remember if I posted them or filed them elsewhere -- check the XORP mailing lists, I think we bashed this out there around 14 months ago.