summaryrefslogtreecommitdiffstats
path: root/resources/utilities/ich9deblob/src/gbe
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-12-30 00:41:06 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-12-30 00:41:06 (EST)
commit55cfd798acbacd0adf6d0ec371604708c76dd73b (patch)
tree213ad09fd2389c857cde97f0a3a3a70d0d74a520 /resources/utilities/ich9deblob/src/gbe
parentf7e4961c04808311c55a018096b81ce6852d992e (diff)
downloadlibreboot-55cfd798acbacd0adf6d0ec371604708c76dd73b.zip
libreboot-55cfd798acbacd0adf6d0ec371604708c76dd73b.tar.gz
libreboot-55cfd798acbacd0adf6d0ec371604708c76dd73b.tar.bz2
ich9gen/ich9deblob: set default MAC address
Diffstat (limited to 'resources/utilities/ich9deblob/src/gbe')
-rw-r--r--resources/utilities/ich9deblob/src/gbe/gbe.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/resources/utilities/ich9deblob/src/gbe/gbe.c b/resources/utilities/ich9deblob/src/gbe/gbe.c
index 12b8d99..150d149 100644
--- a/resources/utilities/ich9deblob/src/gbe/gbe.c
+++ b/resources/utilities/ich9deblob/src/gbe/gbe.c
@@ -104,9 +104,17 @@ struct GBEREGIONRECORD_8K deblobbedGbeStructFromFactory(struct GBEREGIONRECORD_8
deblobbedGbeStruct8k.backup.padding[i] = 0xFF; /* FF is correct. In the struct, this is a char buffer. */
} /* We really only need to do this for words 40h-53h, but let's just nuke the whole lot. It's all 0xFF anyway. */
+ /* Set the default MAC address */
+ deblobbedGbeStruct8k.backup.macAddress[0] = 0x00;
+ deblobbedGbeStruct8k.backup.macAddress[1] = 0xF5;
+ deblobbedGbeStruct8k.backup.macAddress[2] = 0xF0;
+ deblobbedGbeStruct8k.backup.macAddress[3] = 0x40;
+ deblobbedGbeStruct8k.backup.macAddress[4] = 0x71;
+ deblobbedGbeStruct8k.backup.macAddress[5] = 0xFE;
+
/* Fix the checksum */
deblobbedGbeStruct8k.backup.checkSum = gbeGetChecksumFrom4kStruct(deblobbedGbeStruct8k.backup, GBECHECKSUMTOTAL);
- /* Main Gbe region on X200 (as shipped by Lenovo) is broken. Fix it by over-writing it with the contents of Gbe/Backup */
+ /* Main Gbe region on X200 (as shipped by Lenovo) is broken. Fix it by over-writing it with the contents of the backup */
memcpy(&deblobbedGbeStruct8k.main, &deblobbedGbeStruct8k.backup, GBEREGIONSIZE_4K);
return deblobbedGbeStruct8k;
@@ -190,6 +198,7 @@ int notCreatedCFileFromGbeStruct4k(struct GBEREGIONRECORD_4K gbeStruct4k, char*
fprintf(fp, "\n");
/* Words 00h to 02h: MAC Address */
fprintf(fp, " /* MAC address (words 00h to 02h) */\n");
+ fprintf(fp, " /* see ../gbe/gbe.c */\n");
for (i = 0; i < 6; i++) {
fprintf(fp, " gbeStruct4k.macAddress[%d] = 0x%02x;\n", i, gbeStruct4k.macAddress[i]);
}