Index: branches/azimutz/Chazi/i386/libsaio/smbios.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/smbios.c (revision 869) +++ branches/azimutz/Chazi/i386/libsaio/smbios.c (revision 870) @@ -159,8 +159,8 @@ char **defaultValue; } SMBValueSetter; -SMBValueSetter SMBSetters[] = -{ +SMBValueSetter SMBSetters[] = +{ //------------------------------------------------------------------------------------------------------------------------- // BIOSInformation //------------------------------------------------------------------------------------------------------------------------- @@ -204,13 +204,13 @@ {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}, //------------------------------------------------------------------------------------------------------------------------- @@ -555,6 +555,27 @@ { 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++; @@ -599,6 +620,8 @@ 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)); } @@ -629,7 +652,7 @@ tableLength += structSize; - if (structSize > maxStructSize) + if (structSize > maxStructSize) maxStructSize = structSize; structureCount++; @@ -784,9 +807,9 @@ 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; Index: branches/azimutz/Chazi/i386/libsaio/smbios_getters.c =================================================================== --- branches/azimutz/Chazi/i386/libsaio/smbios_getters.c (revision 869) +++ branches/azimutz/Chazi/i386/libsaio/smbios_getters.c (revision 870) @@ -48,8 +48,6 @@ 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) ??? @@ -246,9 +244,9 @@ } } -// return false; - value->string = NOT_AVAILABLE; - return true; + return false; +// value->string = NOT_AVAILABLE; +// return true; } bool getSMBMemoryDeviceSerialNumber(returnType *value) @@ -268,9 +266,9 @@ } } -// return false; - value->string = NOT_AVAILABLE; - return true; + return false; +// value->string = NOT_AVAILABLE; +// return true; } bool getSMBMemoryDevicePartNumber(returnType *value) @@ -290,9 +288,9 @@ } } -// return false; - value->string = NOT_AVAILABLE; - return true; + return false; +// value->string = NOT_AVAILABLE; +// return true; } Index: branches/azimutz/Chazi/i386/boot2/modules.h =================================================================== --- branches/azimutz/Chazi/i386/boot2/modules.h (revision 869) +++ branches/azimutz/Chazi/i386/boot2/modules.h (revision 870) @@ -40,12 +40,12 @@ struct moduleHook_t* next; } moduleHook_t; -typedef struct modulesList_t +typedef struct moduleList_t //Azi: modules or module? see modules/include/modules { char* name; // UInt32 version; // UInt32 compat; - struct modulesList_t* next; + struct moduleList_t* next; } moduleList_t; Index: branches/azimutz/Chazi/i386/modules/Resolution/Resolution.c =================================================================== --- branches/azimutz/Chazi/i386/modules/Resolution/Resolution.c (revision 869) +++ branches/azimutz/Chazi/i386/modules/Resolution/Resolution.c (revision 870) @@ -4,10 +4,15 @@ */ #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; } Index: branches/azimutz/Chazi/i386/libsa/libsa.h =================================================================== --- branches/azimutz/Chazi/i386/libsa/libsa.h (revision 869) +++ branches/azimutz/Chazi/i386/libsa/libsa.h (revision 870) @@ -35,43 +35,43 @@ /* * 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 == '-'); } @@ -89,7 +89,7 @@ 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); Index: branches/azimutz/Chazi/i386/libsa/string.c =================================================================== --- branches/azimutz/Chazi/i386/libsa/string.c (revision 869) +++ branches/azimutz/Chazi/i386/libsa/string.c (revision 870) @@ -119,7 +119,7 @@ /* 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++))