Chameleon

Chameleon Commit Details

Date:2011-05-22 12:47:20 (12 years 11 months ago)
Author:Azimutz
Commit:869
Parents: 868
Message:Merge trunk (r861/63/65/66).
Changes:
M/branches/azimutz/Cleancut/i386/libsa/string.c
M/branches/azimutz/Cleancut/i386/libsaio/spd.c
M/branches/azimutz/Cleancut/i386/libsa/libsa.h
M/branches/azimutz/Cleancut/i386/libsaio/smbios_getters.c
M/branches/azimutz/Cleancut/i386/libsaio/smbios.c
M/branches/azimutz/Cleancut/i386/modules/Resolution/Resolution.c

File differences

branches/azimutz/Cleancut/i386/libsaio/spd.c
361361
362362
363363
364
365
366
367
368
369
370
371
372
373
374
375
364
365
366
367
368
369
370
371
372
373
374
375
376
376377
377378
378379
static struct smbus_controllers_t smbus_controllers[] = {
{0x8086, 0x269B, "ESB2", read_smb_intel },
{0x8086, 0x25A4, "6300ESB", read_smb_intel },
{0x8086, 0x24C3, "ICH4", read_smb_intel },
{0x8086, 0x24D3, "ICH5", read_smb_intel },
{0x8086, 0x266A, "ICH6", read_smb_intel },
{0x8086, 0x27DA, "ICH7", read_smb_intel },
{0x8086, 0x283E, "ICH8", read_smb_intel },
{0x8086, 0x2930, "ICH9", read_smb_intel },
{0x8086, 0x3A30, "ICH10R", read_smb_intel },
{0x8086, 0x3A60, "ICH10B", read_smb_intel },
{0x8086, 0x3B30, "P55", read_smb_intel },
{0x8086, 0x5032, "EP80579", read_smb_intel }
{0x8086, 0x269B, "ESB2",read_smb_intel },
{0x8086, 0x25A4, "6300ESB",read_smb_intel },
{0x8086, 0x24C3, "ICH4",read_smb_intel },
{0x8086, 0x24D3, "ICH5",read_smb_intel },
{0x8086, 0x266A, "ICH6",read_smb_intel },
{0x8086, 0x27DA, "ICH7",read_smb_intel },
{0x8086, 0x283E, "ICH8",read_smb_intel },
{0x8086, 0x2930, "ICH9",read_smb_intel },
{0x8086, 0x3A30, "ICH10R",read_smb_intel },
{0x8086, 0x3A60, "ICH10B",read_smb_intel },
{0x8086, 0x3B30, "5 Series",read_smb_intel },
{0x8086, 0x1C22, "6 Series",read_smb_intel },
{0x8086, 0x5032, "EP80579",read_smb_intel }
};
branches/azimutz/Cleancut/i386/libsaio/smbios.c
148148
149149
150150
151
152
151
152
153153
154154
155155
......
193193
194194
195195
196
196
197197
198
198
199199
200
200
201201
202
202
203203
204204
205205
......
335335
336336
337337
338
338
339339
340340
341341
......
540540
541541
542542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
543565
544566
545567
......
584606
585607
586608
609
610
587611
588612
589613
......
614638
615639
616640
617
641
618642
619643
620644
......
769793
770794
771795
772
796
773797
774
798
775799
776800
777801
char**defaultValue;
} SMBValueSetter;
SMBValueSetter SMBSetters[] =
{
SMBValueSetter SMBSetters[] =
{
//-------------------------------------------------------------------------------------------------------------------------
// BIOSInformation
//-------------------------------------------------------------------------------------------------------------------------
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, product),kSMBBaseBoardProductKey,
NULL,&defaultBaseBoard.product},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, version),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, version),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, serialNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, serialNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, assetTagNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, assetTagNumber),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, locationInChassis),NULL,NULL,NULL},
{kSMBTypeBaseBoard,kSMBString,getFieldOffset(SMBBaseBoard, locationInChassis),NULL,NULL,NULL},
//-------------------------------------------------------------------------------------------------------------------------
break;
case CPU_MODEL_SANDY:
case CPU_MODEL_SANDY_XEON:
case CPU_MODEL_SANDY_XEON:
defaultBIOSInfo.version= kDefaultiMacSandyBIOSVersion;
defaultSystemInfo.productName= kDefaultiMacSandy;
defaultSystemInfo.family= kDefaultiMacFamily;
{
SMBOemProcessorBusSpeed *p = (SMBOemProcessorBusSpeed *)structPtr->new;
switch (Platform.CPU.Family)
{
case 0x06:
{
switch (Platform.CPU.Model)
{
case 0x19:// Intel Core i5 650 @3.20 Ghz
case CPU_MODEL_FIELDS:// Intel Core i5, i7 LGA1156 (45nm)
case CPU_MODEL_DALES:// Intel Core i5, i7 LGA1156 (45nm) ???
case CPU_MODEL_DALES_32NM:// Intel Core i3, i5, i7 LGA1156 (32nm)
case CPU_MODEL_NEHALEM:// Intel Core i7 LGA1366 (45nm)
case CPU_MODEL_NEHALEM_EX:// Intel Core i7 LGA1366 (45nm) 6 Core ???
case CPU_MODEL_WESTMERE:// Intel Core i7 LGA1366 (32nm) 6 Core
case CPU_MODEL_WESTMERE_EX:// Intel Core i7 LGA1366 (45nm) 6 Core ???
break;
default:
return;
}
}
}
p->header.type= kSMBTypeOemProcessorBusSpeed;
p->header.length= sizeof(SMBOemProcessorBusSpeed);
p->header.handle= handle++;
for (i = 0; i < numOfSetters; i++)
if (structPtr->orig->type == SMBSetters[i].type)
{
if (SMBSetters[i].fieldOffset > structPtr->orig->length)
continue;
setterFound = true;
setSMBValue(structPtr, i, (returnType *)((uint8_t *)structPtr->new + SMBSetters[i].fieldOffset));
}
tableLength += structSize;
if (structSize > maxStructSize)
if (structSize > maxStructSize)
maxStructSize = structSize;
structureCount++;
case kSMBTypeMemoryDevice:
Platform.DMI.CntMemorySlots++;
if (((SMBMemoryDevice *)structHeader)->memorySize != 0)
if (((SMBMemoryDevice *)structHeader)->memorySize != 0)
Platform.DMI.MemoryModules++;
if (((SMBMemoryDevice *)structHeader)->memorySpeed > 0)
if (((SMBMemoryDevice *)structHeader)->memorySpeed > 0)
Platform.RAM.DIMM[dimmnbr].Frequency = ((SMBMemoryDevice *)structHeader)->memorySpeed;
dimmnbr++;
break;
branches/azimutz/Cleancut/i386/libsaio/smbios_getters.c
4848
4949
5050
51
52
5351
5452
5553
......
247245
248246
249247
250
251
252
248
249
250
253251
254252
255253
......
269267
270268
271269
272
273
274
270
271
272
275273
276274
277275
......
291289
292290
293291
294
295
296
292
293
294
297295
298296
299297
return false;
case 0x19:// Intel Core i5 650 @3.20 Ghz
case CPU_MODEL_SANDY:// Intel Core i5, i7 LGA1155 sandy bridge
case CPU_MODEL_SANDY_XEON:
case CPU_MODEL_NEHALEM:// Intel Core i7 LGA1366 (45nm)
case CPU_MODEL_FIELDS:// Intel Core i5, i7 LGA1156 (45nm)
case CPU_MODEL_DALES:// Intel Core i5, i7 LGA1156 (45nm) ???
}
}
//return false;
value->string = NOT_AVAILABLE;
return true;
return false;
//value->string = NOT_AVAILABLE;
//return true;
}
bool getSMBMemoryDeviceSerialNumber(returnType *value)
}
}
//return false;
value->string = NOT_AVAILABLE;
return true;
return false;
//value->string = NOT_AVAILABLE;
//return true;
}
bool getSMBMemoryDevicePartNumber(returnType *value)
}
}
//return false;
value->string = NOT_AVAILABLE;
return true;
return false;
//value->string = NOT_AVAILABLE;
//return true;
}
branches/azimutz/Cleancut/i386/modules/Resolution/Resolution.c
44
55
66
7
78
8
99
1010
11
12
1113
14
15
16
1217
1318
*/
#include "915resolution.h"
#include "gui.h"
void Resolution_start()
{
UInt32 bp = 0;
UInt32 x, y;
patchVideoBios();
getResolution(&x, &y, &bp);
gui.screen.width = x;
gui.screen.height = y;
}
branches/azimutz/Cleancut/i386/libsa/libsa.h
3535
3636
3737
38
38
3939
4040
4141
4242
43
43
4444
4545
4646
4747
48
48
4949
5050
5151
5252
53
53
5454
5555
5656
5757
58
58
5959
6060
6161
6262
63
63
6464
6565
6666
6767
68
68
6969
7070
7171
7272
7373
74
74
7575
7676
7777
......
8989
9090
9191
92
92
9393
9494
9595
/*
* ctype stuff (aserebln)
*/
static inline int isupper(char c)
static inline int isupper(int c)
{
return (c >= 'A' && c <= 'Z');
}
static inline int islower(char c)
static inline int islower(int c)
{
return (c >= 'a' && c <= 'z');
}
static inline int isalpha(char c)
static inline int isalpha(int c)
{
return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
}
static inline int isascii(char c)
static inline int isascii(int c)
{
return ( (c >= 0x20) && (c < 0x7f) );
}
static inline int isspace(char c)
static inline int isspace(int c)
{
return (c == ' ' || c == '\t' || c == '\n' || c == '\12');
}
static inline int isdigit(char c)
static inline int isdigit(int c)
{
return (c >= '0' && c <= '9');
}
static inline int isxdigit(char c)
static inline int isxdigit(int c)
{
return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'));
}
//Azi: TODO - add more ponctuation characters as needed; at least these two, i need for PartNo.
static inline int ispunct(char c)
static inline int ispunct(int c)
{
return (c == '.' || c == '-');
}
extern void * memset(void * dst, int c, size_t n);
extern void * memcpy(void * dst, const void * src, size_t len);
extern int memcmp(const void * p1, const void * p2, int len);
extern int memcmp(const void * p1, const void * p2, size_t len);
extern int strcmp(const char * s1, const char * s2);
extern int strncmp(const char * s1, const char * s2, size_t n);
extern char * strcpy(char * s1, const char * s2);
branches/azimutz/Cleancut/i386/libsa/string.c
119119
120120
121121
122
122
123123
124124
125125
/* NOTE: Moved from ntfs.c */
int
memcmp(const void *p1, const void *p2, int len)
memcmp(const void *p1, const void *p2, size_t len)
{
while (len--) {
if (*(const char*)(p1++) != *(const char*)(p2++))

Archive Download the corresponding diff file

Revision: 869