summaryrefslogtreecommitdiffstats
path: root/resources/utilities/ich9deblob/gbe/gbe.h
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-12-23 17:08:37 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-12-23 17:08:37 (EST)
commita8605043c58cb0afd157d11431125b988f7af455 (patch)
tree058571183197ed38b94af1276726439b79cb0d40 /resources/utilities/ich9deblob/gbe/gbe.h
parent1b5c10a8c08a5c5d5c43c02dddbedd6961fbf2e4 (diff)
downloadlibreboot-a8605043c58cb0afd157d11431125b988f7af455.zip
libreboot-a8605043c58cb0afd157d11431125b988f7af455.tar.gz
libreboot-a8605043c58cb0afd157d11431125b988f7af455.tar.bz2
ich9deblob: rename GBEREGIONSIZE to GBEREGIONSIZE_8K
Diffstat (limited to 'resources/utilities/ich9deblob/gbe/gbe.h')
-rw-r--r--resources/utilities/ich9deblob/gbe/gbe.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/resources/utilities/ich9deblob/gbe/gbe.h b/resources/utilities/ich9deblob/gbe/gbe.h
index de3b27d..3b25ddf 100644
--- a/resources/utilities/ich9deblob/gbe/gbe.h
+++ b/resources/utilities/ich9deblob/gbe/gbe.h
@@ -37,7 +37,7 @@
#include <string.h>
/* Size of gbe region in bytes */
-#define GBEREGIONSIZE 0x2000
+#define GBEREGIONSIZE_8K 0x2000
/*
* These will have a modified descriptor+gbe based on what's in the factory.rom
@@ -112,8 +112,8 @@ unsigned short gbeGetChecksumFrom8kBuffer(char* regionData, unsigned short desir
/* checksum calculation for 4k gbe struct (algorithm based on datasheet) */
unsigned short gbeGetChecksumFrom4kStruct(struct GBEREGIONRECORD_4K gbeStruct4k, unsigned short desiredValue)
{
- char gbeBuffer4k[GBEREGIONSIZE>>1];
- memcpy(&gbeBuffer4k, &gbeStruct4k, GBEREGIONSIZE>>1);
+ char gbeBuffer4k[GBEREGIONSIZE_8K>>1];
+ memcpy(&gbeBuffer4k, &gbeStruct4k, GBEREGIONSIZE_8K>>1);
return gbeGetChecksumFrom8kBuffer(gbeBuffer4k, desiredValue, 0);
}
@@ -127,10 +127,10 @@ struct GBEREGIONRECORD_8K deblobbedGbeStructFromFactory(struct GBEREGIONRECORD_8
*/
struct GBEREGIONRECORD_8K deblobbedGbeStruct8k;
- memcpy(&deblobbedGbeStruct8k, &factoryGbeStruct8k, GBEREGIONSIZE);
+ memcpy(&deblobbedGbeStruct8k, &factoryGbeStruct8k, GBEREGIONSIZE_8K);
deblobbedGbeStruct8k.backup.checkSum = gbeGetChecksumFrom4kStruct(deblobbedGbeStruct8k.backup, 0xBABA);
- memcpy(&deblobbedGbeStruct8k.main, &deblobbedGbeStruct8k.backup, GBEREGIONSIZE>>1);
+ memcpy(&deblobbedGbeStruct8k.main, &deblobbedGbeStruct8k.backup, GBEREGIONSIZE_8K>>1);
/*
* Debugging: