Chameleon

Chameleon Commit Details

Date:2010-07-24 15:10:15 (13 years 8 months ago)
Author:mozo
Commit:216
Parents: 215
Message:SPD serial number must be shown well now. 0x00000000 (4 bytes) -> "00000000" (ASCII string)
Changes:
M/branches/mozodojo/i386/libsaio/smbios_patcher.c
M/branches/mozodojo/i386/libsaio/spd.c

File differences

branches/mozodojo/i386/libsaio/spd.c
190190
191191
192192
193
193
194
194195
195196
196197
......
199200
200201
201202
202
203
203204
204205
205206
206
207
207208
208209
209210
return 800; // default freq for unknown types
}
#define UIS(a) ((uint32_t)spd[a])
#define SMST(a) ((uint8_t)((spd[a] & 0xf0) >> 4))
#define SLST(a) ((uint8_t)(spd[a] & 0x0f))
/** Get DDR3 or DDR2 serial number, 0 most of the times, always return a valid ptr */
const char *getDDRSerial(const char* spd)
if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR3) // DDR3
{
sprintf(asciiSerial, "%c%c%c%c", spd[125] & 0x7f, spd[124], spd[123], spd[122]);
sprintf(asciiSerial, "%X%X%X%X%X%X%X%X", SMST(125) & 0x7, SLST(125), SMST(124), SLST(124), SMST(123), SLST(123), SMST(122), SLST(122));
}
else if (spd[SPD_MEMORY_TYPE]==SPD_MEMORY_TYPE_SDRAM_DDR2) // DDR2 or DDR
{
sprintf(asciiSerial, "%c%c%c%c", spd[98] & 0x7f, spd[97], spd[96], spd[95]);
sprintf(asciiSerial, "%X%X%X%X%X%X%X%X", SMST(98) & 0x7, SLST(98), SMST(97), SLST(97), SMST(96), SLST(96), SMST(95), SLST(95));
}
return strdup(asciiSerial);
branches/mozodojo/i386/libsaio/smbios_patcher.c
181181
182182
183183
184
184
185185
186186
187187
return 0x0301;
case 0x2C: // Intel Core i7 LGA1366 (32nm) 6 Core
case 0x2E: // Intel Core i7 LGA1366 (45nm) 6 Core ???
return 0x0601;
return 0x0701;
}
}
}

Archive Download the corresponding diff file

Revision: 216