Chameleon

Chameleon Commit Details

Date:2010-10-11 15:17:18 (9 years 7 months ago)
Author:Kabyl
Commit:585
Parents: 584
Message:fixed getSMBOemProcessorType() (simpleGetSMBOemProcessorType() was always being called at the end), keep the BIOS' default memory device info if we can't read that from SPDs
Changes:
M/branches/Kabyl/i386/libsaio/smbios_getters.c
M/branches/Kabyl/i386/libsaio/smbios.c

File differences

branches/Kabyl/i386/libsaio/smbios.c
369369
370370
371371
372
372
373373
374374
375375
......
380380
381381
382382
383
383
384384
385385
386386
......
442442
443443
444444
445
446
447
448
445
446
449447
450448
451449
/* Used for SM*_N smbios.plist keys */
bool getSMBValueForKey(SMBStructHeader *structHeader, const char *keyString, const char **string, returnType *value)
{
static int idx = 0;
static int idx = -1;
static int current = -1;
int len;
char key[24];
current = structHeader->handle;
}
sprintf(key, "%s_%d", keyString, idx);
sprintf(key, "%s%d", keyString, idx);
if (value)
if (getIntForKey(key, (int *)&(value->dword), SMBPlist))
break;
}
if (SMBSetters[idx].getSMBValue)
{
SMBSetters[idx].getSMBValue((returnType *)&string);
break;
}
if (SMBSetters[idx].getSMBValue((returnType *)&string))
break;
if ((SMBSetters[idx].defaultValue) && *(SMBSetters[idx].defaultValue))
{
string = *(SMBSetters[idx].defaultValue);
branches/Kabyl/i386/libsaio/smbios_getters.c
126126
127127
128128
129
130
129131
130132
131
133
134
132135
133136
134137
......
144147
145148
146149
147
148
150
149151
150152
151153
152
154
153155
154156
155157
156158
157159
158160
159
161
160162
161163
162164
163165
164166
165167
166
168
167169
168170
169171
......
173175
174176
175177
176
178
177179
178180
179181
180182
181
183
182184
183185
184186
185
187
186188
187189
188190
189191
190192
191
192
193
193194
194195
195196
......
209210
210211
211212
212
213
213
214
215
214216
215217
216218
......
230232
231233
232234
233
234
235
236
237
235238
236239
237240
......
250253
251254
252255
253
254
256
257
258
259
255260
256261
257262
......
271276
272277
273278
274
275
279
280
281
282
276283
277284
278285
......
291298
292299
293300
294
295
301
302
303
304
296305
297306
298307
{
static bool done = false;
value->word = simpleGetSMBOemProcessorType();
if (Platform.CPU.Vendor == 0x756E6547) // Intel
{
if (!done) {
if (!done)
{
verbose("CPU is %s, family 0x%x, model 0x%x\n", Platform.CPU.BrandString, Platform.CPU.Family, Platform.CPU.Model);
done = true;
}
case CPU_MODEL_MEROM:// Merom
case CPU_MODEL_PENRYN:// Penryn
case CPU_MODEL_ATOM:// Intel Atom (45nm)
value->word = simpleGetSMBOemProcessorType();
break;
return true;
case CPU_MODEL_NEHALEM:// Intel Core i7 LGA1366 (45nm)
value->word = 0x0701;// Core i7
break;
return true;
case CPU_MODEL_FIELDS:// Lynnfield, Clarksfield, Jasper
if (strstr(Platform.CPU.BrandString, "Core(TM) i5"))
value->word = 0x601;// Core i5
else
value->word = 0x701;// Core i7
break;
return true;
case CPU_MODEL_DALES:// Intel Core i5, i7 LGA1156 (45nm) (Havendale, Auburndale)
if (strstr(Platform.CPU.BrandString, "Core(TM) i5"))
value->word = 0x601;// Core i5
else
value->word = 0x0701;// Core i7
break;
return true;
case CPU_MODEL_DALES_32NM:// Intel Core i3, i5, i7 LGA1156 (32nm) (Clarkdale, Arrandale)
if (strstr(Platform.CPU.BrandString, "Core(TM) i3"))
value->word = 0x601;// Core i5
else
value->word = 0x0701;// Core i7
break;
return true;
case CPU_MODEL_WESTMERE:// Intel Core i7 LGA1366 (32nm) 6 Core (Gulftown, Westmere-EP, Westmere-WS)
case CPU_MODEL_WESTMERE_EX:// Intel Core i7 LGA1366 (45nm) 6 Core ???
value->word = 0x0701;// Core i7
break;
return true;
case 0x19:// Intel Core i5 650 @3.20 Ghz
value->word = 0x601;// Core i5
break;
return true;
}
}
}
}
value->word = simpleGetSMBOemProcessorType();
return true;
return false;
}
bool getSMBMemoryDeviceMemoryType(returnType *value)
}
}
value->byte = SMB_MEM_TYPE_DDR2;
return true;
return false;
//value->byte = SMB_MEM_TYPE_DDR2;
//return true;
}
bool getSMBMemoryDeviceMemorySpeed(returnType *value)
}
}
value->dword = 800;
return true;
return false;
//value->dword = 800;
//return true;
}
bool getSMBMemoryDeviceManufacturer(returnType *value)
return true;
}
}
value->string = "N/A";
return true;
return false;
//value->string = "N/A";
//return true;
}
bool getSMBMemoryDeviceSerialNumber(returnType *value)
return true;
}
}
value->string = "N/A";
return true;
return false;
//value->string = "N/A";
//return true;
}
bool getSMBMemoryDevicePartNumber(returnType *value)
return true;
}
}
value->string = "N/A";
return true;
return false;
//value->string = "N/A";
//return true;
}

Archive Download the corresponding diff file

Revision: 585