[openfirmware] r1003 - cpu/x86/pc/neptune
svn at openfirmware.info
svn at openfirmware.info
Wed Nov 12 00:24:49 CET 2008
Author: wmb
Date: 2008-11-12 00:24:49 +0100 (Wed, 12 Nov 2008)
New Revision: 1003
Modified:
cpu/x86/pc/neptune/mfgdata.fth
Log:
Neptune - use random mac address if manufacturing data area is not set.
Modified: cpu/x86/pc/neptune/mfgdata.fth
===================================================================
--- cpu/x86/pc/neptune/mfgdata.fth 2008-11-11 22:53:41 UTC (rev 1002)
+++ cpu/x86/pc/neptune/mfgdata.fth 2008-11-11 23:24:49 UTC (rev 1003)
@@ -51,8 +51,9 @@
stand-init: Manufacturing data
dangerous-select-mfg-data
- read-nvram \ Read the manufacturing data into memory
- read-ge-area \ Incorporate it into the config variables
+ read-nvram 0= if \ Read the manufacturing data into memory
+ read-ge-area \ Incorporate it into the config variables
+ then
unselect-mfg-data
;
@@ -100,9 +101,6 @@
" " 6 config-mac-address mfg-mac-address
-' mfg-mac-address to system-mac-address
-
-0 [if]
8 buffer: mac-address-buf
: random-mac-address ( -- adr len )
mac-address-buf @ 0= if
@@ -124,10 +122,15 @@
mac-address-buf 6
;
-' random-mac-address to system-mac-address
-[then]
+: choose-mac-address ( -- adr len )
+ mfg-mac-address dup 6 <> if ( adr len )
+ 2drop random-mac-address ( adr' len' )
+ then ( adr len )
+;
+' choose-mac-address to system-mac-address
+
\ LICENSE_BEGIN
\ Copyright (c) 2008 FirmWorks
\
More information about the openfirmware
mailing list