Date: Thu, 14 Sep 2006 18:08:08 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 106106 for review Message-ID: <200609141808.k8EI88Pc049502@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=106106 Change 106106 by imp@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609141808.k8EI88Pc049502>