From 3a667ea44008dcb1958456d6c23ee978f0536eae Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 29 Dec 2014 17:19:25 -0500 Subject: ich9gen: hard-coded flash regions shown, but commented --- (limited to 'resources') diff --git a/resources/utilities/ich9deblob/src/descriptor/descriptor.c b/resources/utilities/ich9deblob/src/descriptor/descriptor.c index 873fad1..899fba1 100644 --- a/resources/utilities/ich9deblob/src/descriptor/descriptor.c +++ b/resources/utilities/ich9deblob/src/descriptor/descriptor.c @@ -249,7 +249,8 @@ int notCreatedCFileFromDescriptorStruct(struct DESCRIPTORREGIONRECORD descriptor fprintf(fp, " descriptorStruct.regionSection.flReg0.LIMIT = 0x%04x;\n", descriptorStruct.regionSection.flReg0.LIMIT); fprintf(fp, " descriptorStruct.regionSection.flReg0.reserved2 = 0x%01x;\n", descriptorStruct.regionSection.flReg0.reserved2); fprintf(fp, " /* FLREG1 (BIOS) */\n"); - fprintf(fp, " descriptorStruct.regionSection.flReg1.BASE = 0x%04x; /* see ../descriptor/descriptor.c */\n", descriptorStruct.regionSection.flReg1.BASE); + fprintf(fp, " /* descriptorStruct.regionSection.flReg1.BASE = 0x%04x; */\n", descriptorStruct.regionSection.flReg1.BASE); + fprintf(fp, " descriptorStruct.regionSection.flReg1.BASE = (DESCRIPTORREGIONSIZE + GBEREGIONSIZE_8K) >> FLREGIONBITSHIFT; /* see ../descriptor/descriptor.c */\n"); fprintf(fp, " descriptorStruct.regionSection.flReg1.reserved1 = 0x%01x;\n", descriptorStruct.regionSection.flReg1.reserved1); fprintf(fp, " /* descriptorStruct.regionSection.flReg1.LIMIT = 0x%04x; */\n", descriptorStruct.regionSection.flReg1.LIMIT); fprintf(fp, " descriptorStruct.regionSection.flReg1.LIMIT = ((romSize >> FLREGIONBITSHIFT) - 1); /* see ../descriptor/descriptor.c */\n"); @@ -260,9 +261,11 @@ int notCreatedCFileFromDescriptorStruct(struct DESCRIPTORREGIONRECORD descriptor fprintf(fp, " descriptorStruct.regionSection.flReg2.LIMIT = 0x%04x; /* see ../descriptor/descriptor.c */\n", descriptorStruct.regionSection.flReg2.LIMIT); fprintf(fp, " descriptorStruct.regionSection.flReg2.reserved2 = 0x%01x;\n", descriptorStruct.regionSection.flReg2.reserved2); fprintf(fp, " /* FLREG3 (Gbe) */\n"); - fprintf(fp, " descriptorStruct.regionSection.flReg3.BASE = 0x%04x; /* see ../descriptor/descriptor.c */\n", descriptorStruct.regionSection.flReg3.BASE); + fprintf(fp, " /* descriptorStruct.regionSection.flReg3.BASE = 0x%04x; */\n", descriptorStruct.regionSection.flReg3.BASE); + fprintf(fp, " descriptorStruct.regionSection.flReg3.BASE = DESCRIPTORREGIONSIZE >> FLREGIONBITSHIFT; /* see ../descriptor/descriptor.c */\n"); fprintf(fp, " descriptorStruct.regionSection.flReg3.reserved1 = 0x%01x;\n", descriptorStruct.regionSection.flReg3.reserved1); - fprintf(fp, " descriptorStruct.regionSection.flReg3.LIMIT = 0x%04x; /* see ../descriptor/descriptor.c */\n", descriptorStruct.regionSection.flReg3.LIMIT); + fprintf(fp, " /* descriptorStruct.regionSection.flReg3.LIMIT = 0x%04x; */\n", descriptorStruct.regionSection.flReg3.LIMIT); + fprintf(fp, " descriptorStruct.regionSection.flReg3.LIMIT = GBEREGIONSIZE_8K >> FLREGIONBITSHIFT; /* see ../descriptor/descriptor.c */\n"); fprintf(fp, " descriptorStruct.regionSection.flReg3.reserved2 = 0x%01x;\n", descriptorStruct.regionSection.flReg3.reserved2); fprintf(fp, " /* FLREG4 (Platform) */\n"); fprintf(fp, " descriptorStruct.regionSection.flReg4.BASE = 0x%04x; /* see ../descriptor/descriptor.c */\n", descriptorStruct.regionSection.flReg4.BASE); diff --git a/resources/utilities/ich9deblob/src/ich9gen/mkdescriptor.c b/resources/utilities/ich9deblob/src/ich9gen/mkdescriptor.c index fce6543..c566afb 100644 --- a/resources/utilities/ich9deblob/src/ich9gen/mkdescriptor.c +++ b/resources/utilities/ich9deblob/src/ich9gen/mkdescriptor.c @@ -76,7 +76,8 @@ struct DESCRIPTORREGIONRECORD generatedDescriptorStruct(unsigned int romSize) descriptorStruct.regionSection.flReg0.LIMIT = 0x0000; descriptorStruct.regionSection.flReg0.reserved2 = 0x0; /* FLREG1 (BIOS) */ - descriptorStruct.regionSection.flReg1.BASE = 0x0003; /* see ../descriptor/descriptor.c */ + /* descriptorStruct.regionSection.flReg1.BASE = 0x0003; */ + descriptorStruct.regionSection.flReg1.BASE = (DESCRIPTORREGIONSIZE + GBEREGIONSIZE_8K) >> FLREGIONBITSHIFT; /* see ../descriptor/descriptor.c */ descriptorStruct.regionSection.flReg1.reserved1 = 0x0; /* descriptorStruct.regionSection.flReg1.LIMIT = 0x07ff; */ descriptorStruct.regionSection.flReg1.LIMIT = ((romSize >> FLREGIONBITSHIFT) - 1); /* see ../descriptor/descriptor.c */ @@ -87,9 +88,11 @@ struct DESCRIPTORREGIONRECORD generatedDescriptorStruct(unsigned int romSize) descriptorStruct.regionSection.flReg2.LIMIT = 0x0000; /* see ../descriptor/descriptor.c */ descriptorStruct.regionSection.flReg2.reserved2 = 0x0; /* FLREG3 (Gbe) */ - descriptorStruct.regionSection.flReg3.BASE = 0x0001; /* see ../descriptor/descriptor.c */ + /* descriptorStruct.regionSection.flReg3.BASE = 0x0001; */ + descriptorStruct.regionSection.flReg3.BASE = DESCRIPTORREGIONSIZE >> FLREGIONBITSHIFT; /* see ../descriptor/descriptor.c */ descriptorStruct.regionSection.flReg3.reserved1 = 0x0; - descriptorStruct.regionSection.flReg3.LIMIT = 0x0002; /* see ../descriptor/descriptor.c */ + /* descriptorStruct.regionSection.flReg3.LIMIT = 0x0002; */ + descriptorStruct.regionSection.flReg3.LIMIT = GBEREGIONSIZE_8K >> FLREGIONBITSHIFT; /* see ../descriptor/descriptor.c */ descriptorStruct.regionSection.flReg3.reserved2 = 0x0; /* FLREG4 (Platform) */ descriptorStruct.regionSection.flReg4.BASE = 0x1fff; /* see ../descriptor/descriptor.c */ -- cgit v0.9.1