Raspberry PI
Bakul Shah
bakul at bitblocks.com
Wed Oct 31 05:07:10 UTC 2012
On Tue, 30 Oct 2012 22:23:51 MDT Warner Losh <imp at 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);
More information about the freebsd-arm
mailing list