Date: Tue, 30 Oct 2012 22:07:09 -0700 From: Bakul Shah <bakul@bitblocks.com> To: Warner Losh <imp@bsdimp.com> Cc: Kang Yin Su <cantona@cantona.net>, "freebsd-arm@FreeBSD.org" <freebsd-arm@freebsd.org> Subject: Re: Raspberry PI Message-ID: <20121031050709.9EACCB827@mail.bitblocks.com> In-Reply-To: Your message of "Tue, 30 Oct 2012 22:23:51 MDT." <F42A77B3-53C4-49A9-AFCB-BEC7E3354D2A@bsdimp.com> References: <CAHjFwoCv0mdzgLOxn7Ym0yg3WZxFJfCx9cesDbMzq5ihFA7ZVQ@mail.gmail.com> <op.wmzi1ceb8527sy@ronaldradial.versatec.local> <CAHjFwoBzMpeWV7ULz9L1RHfgZ30NprKLgFf9-RhVLQ-=b=w19A@mail.gmail.com> <CAHjFwoAK%2B_uvgkv9apNJd2GOdXtDGCiGo4LwaAxqeqkKh62a8A@mail.gmail.com> <50909DBE.2060408@bluezbox.com> <F42A77B3-53C4-49A9-AFCB-BEC7E3354D2A@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 30 Oct 2012 22:23:51 MDT Warner Losh <imp@bsdimp.com> wrote: > > On Oct 30, 2012, at 9:40 PM, Oleksandr Tymoshenko wrote: > >> 3. Ethernet mac address random change every time boot-up? It may due to > >> uboot or firmware issue - apologize if it's OT. > > It's FreeBSD problem that requires somewhat wider solution then hacking one > network driver. > > Why aren't we just getting the MAC address from the FDT? Isn't that how Linux > passes it in? You can directly get it, along with physical display properties, serial number, board rev, ramsize etc., via the mailbox interface. See https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface You will need to implement something like /* * make a property request with given tab. * buf has any request data on call and any response data on return. * reqlen == request length, resplen == response length */ int bcm_mbox_req(int tag, void* buf, int reqlen, int resplen); and use it as enum { ... Tag_getmac = 0x00010003, Tag_getdisp = 0x00048003, ... }; uint8_t macaddr[6]; struct { uint32_t width, height; } rect; bcm_mbox_req(Tag_getmac, macaddr, 0, sizeof macaddr); bcm_mbox_req(Tag_getdisp, &rect, 0, sizeof rect);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121031050709.9EACCB827>