Subject: re: MAC address for PCI hme (Re: CVS commit: syssrc/sys/arch/i386/conf)
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: tech-kern
Date: 08/28/2001 13:22:03
[ On Wednesday, August 29, 2001 at 00:46:06 (+1000), matthew green wrote: ]
> Subject: re: MAC address for PCI hme (Re: CVS commit: syssrc/sys/arch/i386/conf) 
>
>    
>    $ uname
>    SunOS
>    $ eeprom | grep mac
>    local-mac-address?=false
>    $ pwd
>    /usr/include/sys
>    $ egrep "ether_addr.*address" hme.h
>            struct  ether_addr      hme_factaddr;   /* factory mac address */
>            struct  ether_addr      hme_ouraddr;    /* individual address */

Another interesting field in the same struct:

	        u_int                   hme_addrflags;  /* address flags */

I think these might be possible values for that field:

	/* Mac address flags */
	
	#define HME_FACTADDR_PRESENT    0x01    /* factory MAC id present */
	#define HME_FACTADDR_USE        0x02    /* use factory MAC id */

The driver itself (/kernel/drv/hme on SunOS-5.8) contains these strings:

	Using local MAC address
	local-mac-address
	mac-address
	local-mac-address?
	Local Ethernet address = %s

Perhaps the "local-mac-address" is a OFW variable name?

> the above is simply part of the softc equivalent for the solaris hme
> driver.  it doesn't tell one anything about how to implement the
> local-mac-addr for non-OFW/OBP machines.

Sun doesn't have any non-OFW/OBP machines (any more), does it?

I suspect the general rule of thumb though would be to obtain an IEEE
Ethernet vendor ID and then use some private allocation scheme (just
like Sun does by putting the MAC in the machine firmware).

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>