summaryrefslogtreecommitdiffstats
path: root/resources/utilities
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-12-22 06:33:19 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-12-22 06:33:19 (EST)
commita843643341c7c3d772bdeb4d414509c30d34f50a (patch)
tree8b455f9ea5457b2143cf8a17ad26834101df6f25 /resources/utilities
parent3ca41fc74f6da6ff59cfb3183e501c91fb3c2bf6 (diff)
downloadlibreboot-a843643341c7c3d772bdeb4d414509c30d34f50a.zip
libreboot-a843643341c7c3d772bdeb4d414509c30d34f50a.tar.gz
libreboot-a843643341c7c3d772bdeb4d414509c30d34f50a.tar.bz2
ich9deblob: rename factory gbe buffer variable more clearly
Diffstat (limited to 'resources/utilities')
-rw-r--r--resources/utilities/ich9deblob/ich9deblob.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/resources/utilities/ich9deblob/ich9deblob.c b/resources/utilities/ich9deblob/ich9deblob.c
index 750477d..ab347c6 100644
--- a/resources/utilities/ich9deblob/ich9deblob.c
+++ b/resources/utilities/ich9deblob/ich9deblob.c
@@ -122,9 +122,9 @@ int main(int argc, char *argv[])
// the gbe region
fseek(fp, gbeRegionLocation, SEEK_SET);
// data will go in here
- char gbeBuffer[GBEREGIONSIZE];
- // Read the gbe data from the factory.rom and put it in gbeBuffer
- readLen = fread(gbeBuffer, sizeof(char), GBEREGIONSIZE, fp);
+ char factoryGbeBuffer[GBEREGIONSIZE];
+ // Read the gbe data from the factory.rom and put it in factoryGbeBuffer
+ readLen = fread(factoryGbeBuffer, sizeof(char), GBEREGIONSIZE, fp);
if (GBEREGIONSIZE != readLen)
{
printf("\nerror: could not read GBe region from factory.rom (%i) bytes read\n", readLen);
@@ -232,7 +232,7 @@ int main(int argc, char *argv[])
}
// add gbe to the end of the file
- if (GBEREGIONSIZE != fwrite(gbeBuffer, sizeof(char), GBEREGIONSIZE, fp))
+ if (GBEREGIONSIZE != fwrite(factoryGbeBuffer, sizeof(char), GBEREGIONSIZE, fp))
{
printf("\nerror: writing GBe region failed\n");
return 1;
@@ -251,16 +251,16 @@ int main(int argc, char *argv[])
// maybe only the 8 least significant bits are checked? or something deeper than that
// it will need to be tested if those gbe regions that use something other than baba
// will also work with the checksum changed to match baba (per datasheets)
- unsigned short gbeCalculatedChecksum = GetChecksum(gbeBuffer, 0xBABA, 0);
+ unsigned short gbeCalculatedChecksum = GetChecksum(factoryGbeBuffer, 0xBABA, 0);
// get the actual 0x3F'th 16-bit uint that was already in the supplied (pre-compiled) region data
- unsigned short gbeChecksum = GetRegionWord(0x3F, gbeBuffer); // from the original factory.rom
- printf("\noriginal Gbe (main): calculated Gbe checksum: 0x%hx and actual GBe checksum: 0x%hx\n", gbeCalculatedChecksum, gbeChecksum);
+ unsigned short gbeChecksum = GetRegionWord(0x3F, factoryGbeBuffer); // from the original factory.rom
+ printf("\nfactory Gbe (main): calculated Gbe checksum: 0x%hx and actual GBe checksum: 0x%hx\n", gbeCalculatedChecksum, gbeChecksum);
// same as above, but for 2nd region ("backup") in gbe
- gbeCalculatedChecksum = GetChecksum(gbeBuffer, 0xBABA, 1);
+ gbeCalculatedChecksum = GetChecksum(factoryGbeBuffer, 0xBABA, 1);
// get the actual 0x3F'th 16-bit uint that was already in the supplied (pre-compiled) region data
- gbeChecksum = GetRegionWord(0x3F+(0x1000>>1), gbeBuffer);
- printf("original Gbe (backup) calculated Gbe checksum: 0x%hx and actual GBe checksum: 0x%hx\n", gbeCalculatedChecksum, gbeChecksum);
+ gbeChecksum = GetRegionWord(0x3F+(0x1000>>1), factoryGbeBuffer);
+ printf("factory Gbe (backup) calculated Gbe checksum: 0x%hx and actual GBe checksum: 0x%hx\n", gbeCalculatedChecksum, gbeChecksum);
return 0;
}