Chameleon

Chameleon Commit Details

Date:2011-05-22 13:32:33 (8 years 1 month ago)
Author:Azimutz
Commit:870
Parents: 869
Message:Merge trunk (r861/63/65/66).
Changes:
M/branches/azimutz/Chazi/i386/libsa/string.c
M/branches/azimutz/Chazi/i386/boot2/modules.h
M/branches/azimutz/Chazi/i386/libsa/libsa.h
M/branches/azimutz/Chazi/i386/libsaio/smbios_getters.c
M/branches/azimutz/Chazi/i386/libsaio/smbios.c
M/branches/azimutz/Chazi/i386/modules/Resolution/Resolution.c

File differences

branches/azimutz/Chazi/i386/libsaio/smbios.c
159159
160160
161161
162
163
162
163
164164
165165
166166
......
204204
205205
206206
207
207
208208
209
209
210210
211
211
212212
213
213
214214
215215
216216
......
555555
556556
557557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
558579
559580
560581
......
599620
600621
601622
623
624
602625
603626
604627
......
629652
630653
631654
632
655
633656
634657
635658
......
784807
785808
786809
787
810
788811
789
812
790813
791814
792815
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},
//-------------------------------------------------------------------------------------------------------------------------
{
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/Chazi/i386/libsaio/smbios_getters.c
4848
4949
5050
51
52
5351
5452
5553
......
246244
247245
248246
249
250
251
247
248
249
252250
253251
254252
......
268266
269267
270268
271
272
273
269
270
271
274272
275273
276274
......
290288
291289
292290
293
294
295
291
292
293
296294
297295
298296
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/Chazi/i386/boot2/modules.h
4040
4141
4242
43
43
4444
4545
4646
4747
48
48
4949
5050
5151
struct moduleHook_t* next;
} moduleHook_t;
typedef struct modulesList_t
typedef struct moduleList_t //Azi: modules or module? see modules/include/modules
{
char*name;
//UInt32version;
//UInt32compat;
struct modulesList_t* next;
struct moduleList_t*next;
} moduleList_t;
branches/azimutz/Chazi/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/Chazi/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/Chazi/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: 870