From owner-freebsd-arm@FreeBSD.ORG Wed Oct 31 05:07:10 2012 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AD6936A7 for ; Wed, 31 Oct 2012 05:07:10 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (ns1.bitblocks.com [173.228.5.8]) by mx1.freebsd.org (Postfix) with ESMTP id 84E358FC14 for ; Wed, 31 Oct 2012 05:07:10 +0000 (UTC) Received: from bitblocks.com (localhost [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 9EACCB827; Tue, 30 Oct 2012 22:07:09 -0700 (PDT) To: Warner Losh Subject: Re: Raspberry PI In-reply-to: Your message of "Tue, 30 Oct 2012 22:23:51 MDT." References: <50909DBE.2060408@bluezbox.com> Comments: In-reply-to Warner Losh message dated "Tue, 30 Oct 2012 22:23:51 -0600." Date: Tue, 30 Oct 2012 22:07:09 -0700 From: Bakul Shah Message-Id: <20121031050709.9EACCB827@mail.bitblocks.com> Cc: Kang Yin Su , "freebsd-arm@FreeBSD.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 05:07:10 -0000 On Tue, 30 Oct 2012 22:23:51 MDT Warner Losh 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);