From owner-freebsd-sparc64@FreeBSD.ORG Mon Jul 19 21:25:25 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5E1016A4CE for ; Mon, 19 Jul 2004 21:25:25 +0000 (GMT) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19D5C43D2D for ; Mon, 19 Jul 2004 21:25:25 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) i6JLPO1a041102; Mon, 19 Jul 2004 23:25:24 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.10/8.12.10/Submit) id i6JLPIs4041101; Mon, 19 Jul 2004 23:25:18 +0200 (CEST) (envelope-from marius) Date: Mon, 19 Jul 2004 23:25:18 +0200 From: Marius Strobl To: Joerg Wunsch Message-ID: <20040719232518.B37923@newtrinity.zeist.de> References: <20040719170238.GA3121@sunhsc.germany.sun.com> <20040719172658.GC10699@electra.cse.Buffalo.EDU> <20040719184127.GA20452@ida.interface-business.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040719184127.GA20452@ida.interface-business.de>; from j@ida.interface-business.de on Mon, Jul 19, 2004 at 08:41:27PM +0200 X-AntiVirus: checked by AntiVir Milter 1.1-beta; AVE 6.26.0.5; VDF 6.26.0.32 (host: newtrinity.zeist.de) cc: freebsd-sparc64@freebsd.org Subject: Re: Quad ethernet card on AXi starts with identical MAC addresses on 5.2.1R X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2004 21:25:25 -0000 On Mon, Jul 19, 2004 at 08:41:27PM +0200, Joerg Wunsch wrote: > As Ken Smith wrote: > > > > > I am just wondering if that behavior is as intended. > > > > Yes, unless you set local-mac-address? to true in OBP. > > > I would be interested in knowing if this works. > > Last time I tried it on FreeBSD, it didn't work. > > > The pathway I followed seemed to dig the MAC address out of the > > ID-PROM no matter what. In particular hme_pci_attach() seems to > > call OF_getetheraddr() which in turn seems to blindly dig the MAC > > address out of the idprom. > > I've also got that impression. > > I'd also be interested in a way to dig out the MAC address of the card > (which must be possible, somehow -- after all, there are four address > labels on the NVRAM [or whatever it is] on the card itself), so it > would be possible to e. g. use a QFE card (which once has been a huge > investment) on a non-sparc64 FreeBSD system. It seems that right now, > the only dependency of the hme driver on sparc64 is the call to OFW to > obtain the MAC address... > That's correct but obtaining these addresses on platforms not having Open Firmware isn't very nice. The problem is that the hme device is function 1 of the PCI chip but the FCode containing the MAC address is part of the EBus bridge which is function 0. So one would have to either attach an own driver to the EBus bridge on platforms without Open Firmware which is (only) used to obtain the MAC address or fake bus tags etc. for function 0 in the hme driver. Reading the MAC address from the FCode also has to be done manually.