diff options
author | Francis 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) |
commit | 55cfd798acbacd0adf6d0ec371604708c76dd73b (patch) | |
tree | 213ad09fd2389c857cde97f0a3a3a70d0d74a520 /resources/utilities/ich9deblob/src | |
parent | f7e4961c04808311c55a018096b81ce6852d992e (diff) | |
download | libreboot-55cfd798acbacd0adf6d0ec371604708c76dd73b.zip libreboot-55cfd798acbacd0adf6d0ec371604708c76dd73b.tar.gz libreboot-55cfd798acbacd0adf6d0ec371604708c76dd73b.tar.bz2 |
ich9gen/ich9deblob: set default MAC address
Diffstat (limited to 'resources/utilities/ich9deblob/src')
-rw-r--r-- | resources/utilities/ich9deblob/src/gbe/gbe.c | 11 | ||||
-rw-r--r-- | resources/utilities/ich9deblob/src/ich9gen/mkgbe.c | 13 |
2 files changed, 17 insertions, 7 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]); } diff --git a/resources/utilities/ich9deblob/src/ich9gen/mkgbe.c b/resources/utilities/ich9deblob/src/ich9gen/mkgbe.c index 2765048..bde7bef 100644 --- a/resources/utilities/ich9deblob/src/ich9gen/mkgbe.c +++ b/resources/utilities/ich9deblob/src/ich9gen/mkgbe.c @@ -26,12 +26,13 @@ struct GBEREGIONRECORD_4K generatedGbeStruct4k() struct GBEREGIONRECORD_4K gbeStruct4k; /* MAC address (words 00h to 02h) */ + /* see ../gbe/gbe.c */ gbeStruct4k.macAddress[0] = 0x00; - gbeStruct4k.macAddress[1] = 0x1f; - gbeStruct4k.macAddress[2] = 0x16; - gbeStruct4k.macAddress[3] = 0x32; - gbeStruct4k.macAddress[4] = 0x50; - gbeStruct4k.macAddress[5] = 0xe5; + gbeStruct4k.macAddress[1] = 0xf5; + gbeStruct4k.macAddress[2] = 0xf0; + gbeStruct4k.macAddress[3] = 0x40; + gbeStruct4k.macAddress[4] = 0x71; + gbeStruct4k.macAddress[5] = 0xfe; /* Word 03h (Reserved) */ gbeStruct4k.reservedWord03h.reserved1_0 = 0x00; @@ -236,7 +237,7 @@ struct GBEREGIONRECORD_4K generatedGbeStruct4k() gbeStruct4k.pxeSoftwareRegion.paddingWords34hTo3Eh[10] = 0xffff; /* Word 3Fh (Checksum) */ - gbeStruct4k.checkSum = 0x3285; + gbeStruct4k.checkSum = 0x348a; /* The rest of Gbe (word 40h or byte 80h onwards) is just padding (0xFF) */ for (i = 0; i < 3968; i++) { |