diff options
author | Francis Rowe <info@gluglug.org.uk> | 2014-12-26 21:08:06 +0000 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2014-12-26 21:30:21 +0000 |
commit | bc149e7d986f4c11aa85df8d8499dc367b34a855 (patch) | |
tree | 6d044c404c4e699430d90d7be93b8b0e22b2c9b9 /resources/utilities/ich9deblob/src/gbe | |
parent | 4f2bbba7b75e96a13ac26cad501f78dbe894ba4a (diff) | |
download | librebootfr-bc149e7d986f4c11aa85df8d8499dc367b34a855.tar.gz librebootfr-bc149e7d986f4c11aa85df8d8499dc367b34a855.zip |
ich9deblob: fill padding in Gbe with 0xFF
Words 40h to 53h had unknown data that could not be fonud in the
datasheets. Setting them to 0xFFFF doesn't seem to cause any
issues for users.
Diffstat (limited to 'resources/utilities/ich9deblob/src/gbe')
-rw-r--r-- | resources/utilities/ich9deblob/src/gbe/gbe.c | 19 | ||||
-rw-r--r-- | resources/utilities/ich9deblob/src/gbe/gbe.h | 4 |
2 files changed, 21 insertions, 2 deletions
diff --git a/resources/utilities/ich9deblob/src/gbe/gbe.c b/resources/utilities/ich9deblob/src/gbe/gbe.c index 9eee8284..b41b0dbe 100644 --- a/resources/utilities/ich9deblob/src/gbe/gbe.c +++ b/resources/utilities/ich9deblob/src/gbe/gbe.c @@ -76,12 +76,29 @@ struct GBEREGIONRECORD_8K deblobbedGbeStructFromFactory(struct GBEREGIONRECORD_8 /* * Correct the main gbe region. By default, the X200 (as shipped from Lenovo) comes * with a broken main gbe region, where the backup gbe region is used instead. Modify - * it so that the main region is usable. + * the backup as desired and then copy it to the main region. */ + + int i; struct GBEREGIONRECORD_8K deblobbedGbeStruct8k; memcpy(&deblobbedGbeStruct8k, &factoryGbeStruct8k, GBEREGIONSIZE_8K); + /* + * Word 40h to 53h of Gbe had this in the old deblobbed_descriptor.bin: + * 20 60 1F 00 02 00 13 00 00 80 1D 00 FF 00 16 00 DD CC 18 00 11 20 17 00 DD DD 18 00 12 20 17 00 00 80 1D 00 00 00 1F 00 + * + * The same data was observed on others (created from other factory.rom dumps). + * + * The datasheets don't mention it for Intel 82576LM ethernet controller (what X200 uses) but later ones + * (for later chipsets) do. Maybe these are "reserved". Or maybe they are just junk. + * + * We really don't know. Blanking them with 0xFF seems harmless, though (nothing important seems broken). + */ + for(i = 0; i < sizeof(deblobbedGbeStruct8k.backup.padding); i++) { + deblobbedGbeStruct8k.backup.padding[i] = 0xFF; /* FF is correct. In the struct, this is a char buffer. */ + } + deblobbedGbeStruct8k.backup.checkSum = gbeGetChecksumFrom4kStruct(deblobbedGbeStruct8k.backup, GBECHECKSUMTOTAL); memcpy(&deblobbedGbeStruct8k.main, &deblobbedGbeStruct8k.backup, GBEREGIONSIZE_4K); diff --git a/resources/utilities/ich9deblob/src/gbe/gbe.h b/resources/utilities/ich9deblob/src/gbe/gbe.h index 0a9b1144..5d6348c1 100644 --- a/resources/utilities/ich9deblob/src/gbe/gbe.h +++ b/resources/utilities/ich9deblob/src/gbe/gbe.h @@ -399,7 +399,9 @@ struct GBEREGIONRECORD_4K { unsigned short reservedWords24to2Fh[12]; /* Words 24-2F: Reserved. These should all be 0x0000 according to datasheet and deblobbed_descriptor.bin */ struct GBE_PXE_SOFTWARE_REGION pxeSoftwareRegion; /* Words 30-3E: PXE Software Region */ unsigned short checkSum; /* when added to the sum of all words above, this should match GBECHECKSUMTOTAL */ - unsigned char padding1[3968]; + + /* set all bytes in here to 0xFF */ + unsigned char padding[3968]; }; /* main and backup region in gbe */ |