Octeon MAC address

Andrew Duane aduane at juniper.net
Mon Nov 28 13:36:33 UTC 2011


I have several other fields in the sysinfo structure that are not initialized through the minimal_initialize call, and the MAC address (base + count) is one of them. There are also one or two things that could be removed from the call (e.g. clock speed). I don't know that we should muck with the existing call since it is in the SDK; I was thinking of adding a secondary init call for the rest of the fields. At the moment I just manually set these fields for both U-Boot and other bootstrap cases (with basically the same two lines of code you added).

IIRC, the CAPK-0100ND board is correctly called out to set the MAC address offset (to account for the management port), so once you set the base all should be well. I did note that the code that attaches MAC addresses to interfaces does NOT check the count. It "assumes" that you have enough to handle however many interfaces/ports your board declares itself as having.

Your patch is fine. My work extends that to some other fields I trip across, and the non-U-Boot case (which doesn't use the octeon_bootinfo structure).

 ...................................
Andrew Duane
Juniper Networks
+1 978-589-0551 (o)
+1 603-770-7088 (m)
aduane at juniper.net

 


> -----Original Message-----
> From: juli at clockworksquid.com [mailto:juli at clockworksquid.com] On Behalf
> Of Juli Mallett
> Sent: Sunday, November 27, 2011 9:40 PM
> To: Oleksandr Tymoshenko; Andrew Duane; Marcel Moolenaar
> Cc: freebsd-mips
> Subject: Re: Octeon MAC address
> 
> CCing Andrew and Marcel who had made changes to eliminate the use of
> bootinfo.  I suspect this is the right change, and hope they'll be
> able to take a look at it.  You may want to check that other fields
> that can be copied from the bootinfo to sysinfo are — obviously
> anything not passed to the minimal sysinfo initialize call will not be
> available unless we add it explicitly here.
> 
> Good catch!
> 
> Thanks,
> Juli.
> 
> On Sun, Nov 27, 2011 at 17:49, Oleksandr Tymoshenko <gonzo at bluezbox.com>
> wrote:
> > Hello,
> >
> > I tried booting latest kernel on my CAPK-0100ND board and it seems to
> have some issues with initializing
> > ethernet: octe0 gets zero MAC address although proper MAC address is
> printed earlier:
> >
> > Boot Descriptor Ver: 7 -> 1/2  CPU clock: 500MHz  Core Mask: 0
> >  Board Type: 11  Revision: 0/0
> >  Mac Address 00.90.FB.26.26.CA (3)
> >
> >
> >
> > This simple patch fixes the issue:
> > http://people.freebsd.org/~gonzo/mips/octeon-mac.diff
> >
> > I do not have enough experience with octeon's boot descriptor so I am
> not sure if it's a proper fix
> > for this issue or  it should be fixed in octeon-sdk sources. Could
> someone with more expertise
> > take a look at it?
> >
> >
> >
> > _______________________________________________
> > freebsd-mips at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> > To unsubscribe, send any mail to "freebsd-mips-
> unsubscribe at freebsd.org"
> >


More information about the freebsd-mips mailing list