[LinuxBIOS] retrieving MAC from romstrap

Tom Sylla tsylla at gmail.com
Wed Sep 26 23:02:33 CEST 2007


On 9/26/07, Robert Millan <rmh at aybabtu.com> wrote:
>                 unsigned long mac_pos;
>                 mac_pos = 0xffffffd0; // refer to romstrap.inc and romstrap.lds
>                 mac_l = readl(mac_pos) + nic_index;
>                 mac_h = readl(mac_pos + 4);
>
> and can't understand what is this romstrap and why it retrieves the MAC from
> it in runtime.  Is this some kind of legacy interface?  Wouldn't it be simpler
> to just hardcode it during build?  E.g. see attached patch.

Maybe simpler, but not really correct. What if you have 2 of your
boards? With your patch, you have to compile twice. That's not
elegant. If you can make just one ROM image, and then automatically
change the MAC at a specified location inside of it for each
individual motherboard, things work better. (AMI/award/etc do this,
when you use their flash utilities, it does not overwrite the MAC so
you don't lose it)

Your solution is ok if you want to just support your single board on
your desktop, but for anybody trying to make a commercial product with
LB, they won't want to be recompiling for each unit shipped.




More information about the coreboot mailing list