Chameleon

Chameleon Commit Details

Date:2010-07-29 02:40:54 (13 years 8 months ago)
Author:Rekursor
Commit:274
Parents: 273
Message:Cleaned up some duplicated smbios / cpu infos, getSmbios() still called. first call is too prematurate, so second call still needed. Gotta sort that mess...
Changes:
M/trunk/i386/libsaio/smbios_patcher.c

File differences

trunk/i386/libsaio/smbios_patcher.c
202202
203203
204204
205
206
207
205
208206
209207
210208
......
233231
234232
235233
234
235
236
237
238
236239
237240
238241
......
248251
249252
250253
251
254
252255
253256
254
257
255258
256259
257260
258
261
259262
260263
261
264
262265
263266
264267
265268
266269
267
270
271
268272
269273
270274
......
570574
571575
572576
573
574
577
578
575579
580
581
576582
577583
578584
......
842848
843849
844850
845
851
852
853
854
855
846856
847857
848858
static int sm_get_bus_speed (const char *name, int table_num)
{
if (Platform.CPU.Vendor == 0x756E6547) // Intel
{
verbose("CPU is Intel, family 0x%x, model 0x%x, ext.model 0x%x\n", Platform.CPU.Family, Platform.CPU.Model, Platform.CPU.ExtModel);
{
switch (Platform.CPU.Family)
{
case 0x06:
static int sm_get_cputype (const char *name, int table_num)
{
static bool done = false;
static int result=0;
if (done) return result;
if (Platform.CPU.Vendor == 0x756E6547) // Intel
{
verbose("CPU is Intel, family 0x%x, model 0x%x, ext.model 0x%x\n", Platform.CPU.Family, Platform.CPU.Model, Platform.CPU.ExtModel);
case 0x1C: // Intel Atom (45nm)
return sm_get_simplecputype();
case 0x1A: // Intel Core i7 LGA1366 (45nm)
return 0x0701;
return (result = 0x0701);
case 0x1E: // Intel Core i5, i7 LGA1156 (45nm)
// get this opportunity to fill the known processor interconnect speed for cor i5/i7 in GT/s
return 0x0701;
return (result = 0x0701);
case 0x1F: // Intel Core i5, i7 LGA1156 (45nm) ???
return 0x0601;
case 0x25: // Intel Core i3, i5, i7 LGA1156 (32nm)
return 0x0301;
return (result = 0x0301);
case 0x2C: // Intel Core i7 LGA1366 (32nm) 6 Core
case 0x2E: // Intel Core i7 LGA1366 (45nm) 6 Core ???
return 0x0601;
return (result = 0x0601);
}
}
}
}
return sm_get_simplecputype();
return (result = sm_get_simplecputype());
if (!done) done = true;
}
static int sm_get_memtype (const char *name, int table_num)
int i, j;
int tablespresent[256];
bool do_auto=true;
extern void dumpPhysAddr(const char * title, void * a, int len);
static bool done = false; // IMPROVEME: called twice via getSmbios(), but only the second call can get all necessary info !
extern void dumpPhysAddr(const char * title, void * a, int len);
bzero(tablespresent, sizeof(tablespresent));
bzero(handles, sizeof(handles));
newsmbios->dmi.checksum = 256 - checksum8(&newsmbios->dmi, sizeof(newsmbios->dmi));
newsmbios->checksum = 0;
newsmbios->checksum = 256 - checksum8(newsmbios, sizeof(*newsmbios));
verbose("Patched DMI Table\n");
if (!done) {
verbose("Patched DMI Table\n");
done=true;
}
}
#define MAX_DMI_TABLES 96

Archive Download the corresponding diff file

Revision: 274