summaryrefslogtreecommitdiffstats
path: root/resources/utilities/ich9deblob/src/ich9deblob.c
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-01-10 18:07:56 (EST)
committer Francis Rowe <info@gluglug.org.uk>2015-01-10 18:07:56 (EST)
commitf6da483213c5a9ad026c2740eeff120414492a40 (patch)
tree72c62f49cc617a15a023134c26679c30133aacab /resources/utilities/ich9deblob/src/ich9deblob.c
parent74adfa0f8c41754d1a74006b6ca5f923fd2af503 (diff)
downloadlibreboot-f6da483213c5a9ad026c2740eeff120414492a40.zip
libreboot-f6da483213c5a9ad026c2740eeff120414492a40.tar.gz
libreboot-f6da483213c5a9ad026c2740eeff120414492a40.tar.bz2
ich9deblob/ich9gen: use portable data types
For those integers that need to be a certain byte size.
Diffstat (limited to 'resources/utilities/ich9deblob/src/ich9deblob.c')
-rw-r--r--resources/utilities/ich9deblob/src/ich9deblob.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/resources/utilities/ich9deblob/src/ich9deblob.c b/resources/utilities/ich9deblob/src/ich9deblob.c
index 3606686..d025a64 100644
--- a/resources/utilities/ich9deblob/src/ich9deblob.c
+++ b/resources/utilities/ich9deblob/src/ich9deblob.c
@@ -47,13 +47,13 @@
#include "ich9deblob.h"
-int main(int argc, char *argv[])
+int main()
{
/*
* descriptor region. Will have an actual descriptor struct mapped to it (from the factory.rom dump)
* and then it will be modified (deblobbed) to remove the ME/AMT
*/
- char factoryDescriptorBuffer[DESCRIPTORREGIONSIZE];
+ uint8_t factoryDescriptorBuffer[DESCRIPTORREGIONSIZE];
struct DESCRIPTORREGIONRECORD factoryDescriptorStruct;
struct DESCRIPTORREGIONRECORD deblobbedDescriptorStruct;
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
* gbe region. Well have actual gbe buffer mapped to it (from the factory.rom dump)
* and then it will be modified to correct the main region
*/
- char factoryGbeBuffer8k[GBEREGIONSIZE_8K];
+ uint8_t factoryGbeBuffer8k[GBEREGIONSIZE_8K];
struct GBEREGIONRECORD_8K factoryGbeStruct8k;
struct GBEREGIONRECORD_8K deblobbedGbeStruct8k;
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
* Used to store the location of the Gbe
* region inside the factory.rom image.
*/
- unsigned int factoryGbeRegionStart;
+ uint32_t factoryGbeRegionStart;
/* names of the files that this utility will handle */
char* factoryRomFilename = "factory.rom"; /* user-supplied factory.bin dump (original firmware) */
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
* Get the descriptor region dump from the factory.rom
* (goes in factoryDescriptorBuffer variable)
*/
- bufferLength = fread(factoryDescriptorBuffer, sizeof(char), DESCRIPTORREGIONSIZE, fileStream);
+ bufferLength = fread(factoryDescriptorBuffer, 1, DESCRIPTORREGIONSIZE, fileStream);
if (DESCRIPTORREGIONSIZE != bufferLength) //
{
printf("\nerror: could not read descriptor from factory.rom (%i) bytes read\n", bufferLength);
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
*/
fseek(fileStream, factoryGbeRegionStart, SEEK_SET);
/* Read the gbe data from the factory.rom and put it in factoryGbeBuffer8k */
- bufferLength = fread(factoryGbeBuffer8k, sizeof(char), GBEREGIONSIZE_8K, fileStream);
+ bufferLength = fread(factoryGbeBuffer8k, 1, GBEREGIONSIZE_8K, fileStream);
if (GBEREGIONSIZE_8K != bufferLength)
{
printf("\nerror: could not read GBe region from factory.rom (%i) bytes read\n", bufferLength);