From 6c8370cde6bb15b0c127fca60169db8380d87232 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sun, 11 Jan 2015 04:30:02 +0000 Subject: ich9deblob/ich9gen: rename checksum function It's actually working on a 4KiB buffer, not an 8KiB buffer. --- resources/utilities/ich9deblob/src/gbe/gbe.c | 4 ++-- resources/utilities/ich9deblob/src/gbe/gbe.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'resources/utilities') diff --git a/resources/utilities/ich9deblob/src/gbe/gbe.c b/resources/utilities/ich9deblob/src/gbe/gbe.c index 1d48f2ca..b39e22b6 100644 --- a/resources/utilities/ich9deblob/src/gbe/gbe.c +++ b/resources/utilities/ich9deblob/src/gbe/gbe.c @@ -33,7 +33,7 @@ */ /* gbe checksum calculation (algorithm based on datasheet) */ -uint16_t gbeGetChecksumFrom8kBuffer(uint16_t* regionData, uint16_t desiredValue, int gbeRegionBase) +uint16_t gbeGetChecksumFrom4kBuffer(uint16_t* regionData, uint16_t desiredValue, int gbeRegionBase) { int wordOffset; uint16_t total = 0; @@ -47,7 +47,7 @@ uint16_t gbeGetChecksumFrom8kBuffer(uint16_t* regionData, uint16_t desiredValue, /* checksum calculation for 4k gbe struct (algorithm based on datasheet) */ uint16_t gbeGetChecksumFrom4kStruct(struct GBEREGIONRECORD_4K gbeStruct4k, uint16_t desiredValue) { - return gbeGetChecksumFrom8kBuffer((uint16_t*)&gbeStruct4k, desiredValue, 0); + return gbeGetChecksumFrom4kBuffer((uint16_t*)&gbeStruct4k, desiredValue, 0); } /* modify the gbe region extracted from a factory.rom dump */ diff --git a/resources/utilities/ich9deblob/src/gbe/gbe.h b/resources/utilities/ich9deblob/src/gbe/gbe.h index ff620c44..39e7e676 100644 --- a/resources/utilities/ich9deblob/src/gbe/gbe.h +++ b/resources/utilities/ich9deblob/src/gbe/gbe.h @@ -424,7 +424,7 @@ struct GBEREGIONRECORD_8K { * --------------------------------------------------------------------- */ -uint16_t gbeGetChecksumFrom8kBuffer(uint16_t* regionData, uint16_t desiredValue, int gbeRegionBase); +uint16_t gbeGetChecksumFrom4kBuffer(uint16_t* regionData, uint16_t desiredValue, int gbeRegionBase); uint16_t gbeGetChecksumFrom4kStruct(struct GBEREGIONRECORD_4K gbeStruct4k, uint16_t desiredValue); struct GBEREGIONRECORD_8K deblobbedGbeStructFromFactory(struct GBEREGIONRECORD_8K factoryGbeStruct8k); int notCreatedHFileForGbeCFile(char* outFileName, char* cFileName); -- cgit v1.2.3-70-g09d2