PERFORCE change 106106 for review
Warner Losh
imp at FreeBSD.org
Thu Sep 14 11:08:14 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106106
Change 106106 by imp at imp_lighthouse on 2006/09/14 18:07:13
#ifdef'd out code to write primitive euid64 to the eeprom.
Fix code that reads it in.
print mac address onboot, for now.
Affected files ...
.. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#16 edit
Differences ...
==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#16 (text+ko) ====
@@ -205,20 +205,34 @@
MacFromEE()
{
uint32_t sig;
+#if 0
+ uint8_t euid64[8] = { 0x00, 0x30, 0x96, 0x20,
+ 0x00, 0x00, 0x00, 0x05 };
+#else
uint8_t euid64[8];
+#endif
+#if 0
+ printf("writing...\n");
+ sig = 0xaa55aa55;
+ EEWrite(0, (uint8_t *)&sig, sizeof(sig));
+ EEWrite(48, euid64, sizeof(euid64));
+#endif
+ sig = 0;
EERead(0, (uint8_t *)&sig, sizeof(sig));
if (sig != 0xaa55aa55) {
printf("Bad signature %x\n", sig);
return;
}
- EERead(48, euid64, 8);
+ EERead(48, euid64, sizeof(euid64));
mac[0] = euid64[0];
mac[1] = euid64[1];
- mac[2] = euid64[4];
+ mac[2] = euid64[2];
mac[3] = euid64[5];
mac[4] = euid64[6];
- mac[6] = euid64[7];
+ mac[5] = euid64[7];
+ printf("MAC Address %x:%x:%x:%x:%x:%x\n", mac[0],
+ mac[1], mac[2], mac[3], mac[4], mac[5]);
}
int
More information about the p4-projects
mailing list