summaryrefslogtreecommitdiffstats
path: root/resources/utilities/ich9deblob/gbe/gbe.h
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-12-23 21:20:47 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-12-23 21:20:47 (EST)
commit44dbb6e5e4160ff8663df9f176bb6313cabb8ad1 (patch)
treec143757549e2e12af04c31d949159e3963a72f09 /resources/utilities/ich9deblob/gbe/gbe.h
parent7f550097fa1089c6072e3373648a2278ee3b89d4 (diff)
downloadlibreboot-44dbb6e5e4160ff8663df9f176bb6313cabb8ad1.zip
libreboot-44dbb6e5e4160ff8663df9f176bb6313cabb8ad1.tar.gz
libreboot-44dbb6e5e4160ff8663df9f176bb6313cabb8ad1.tar.bz2
ich9deblob: add define for 0xBABA gbe checksum and use it
Diffstat (limited to 'resources/utilities/ich9deblob/gbe/gbe.h')
-rw-r--r--resources/utilities/ich9deblob/gbe/gbe.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/resources/utilities/ich9deblob/gbe/gbe.h b/resources/utilities/ich9deblob/gbe/gbe.h
index 17d6a93..27ad4d7 100644
--- a/resources/utilities/ich9deblob/gbe/gbe.h
+++ b/resources/utilities/ich9deblob/gbe/gbe.h
@@ -43,6 +43,13 @@
*/
#define GBEREGIONSIZE_4K 0x1000
+/*
+ * When adding up the first 0x3F 16-bit words
+ * in a 4KiB GBE region, it should be equal
+ * to 0xBABA
+ */
+#define GBECHECKSUMTOTAL 0xBABA
+
/*
* These will have a modified descriptor+gbe based on what's in the factory.rom
* These will be joined into a single 12KiB buffer (descriptor, then gbe) and saved to a file
@@ -59,7 +66,7 @@
struct GBEREGIONRECORD_4K {
unsigned char macAddress[6]; /* 0x03 words, or 0x06 bytes */
unsigned char otherStuff[120]; /* 0x3c words, or 0x7E bytes */
- unsigned short checkSum; /* when added to the sum of all words above, this should be 0xBABA */
+ unsigned short checkSum; /* when added to the sum of all words above, this should match GBECHECKSUMTOTAL */
unsigned char padding1[3968];
};