Index: branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_getters.h =================================================================== --- branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_getters.h (revision 2147) +++ branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_getters.h (revision 2148) @@ -33,6 +33,7 @@ extern bool getSMBOemProcessorBusSpeed(returnType *value); extern bool getSMBOemProcessorType(returnType *value); extern bool getSMBMemoryDeviceMemoryType(returnType *value); +extern bool getSMBMemoryDeviceMemoryErrorHandle(returnType *value); extern bool getSMBMemoryDeviceMemorySpeed(returnType *value); extern bool getSMBMemoryDeviceManufacturer(returnType *value); extern bool getSMBMemoryDeviceSerialNumber(returnType *value); Index: branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios.c =================================================================== --- branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios.c (revision 2147) +++ branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios.c (revision 2148) @@ -246,6 +246,8 @@ {kSMBTypeMemoryDevice, kSMBString, getFieldOffset(SMBMemoryDevice, assetTag), NULL, NULL, NULL}, + {kSMBTypeMemoryDevice, kSMBWord, getFieldOffset(SMBMemoryDevice, errorHandle), NULL, getSMBMemoryDeviceMemoryErrorHandle, NULL}, + {kSMBTypeMemoryDevice, kSMBString, getFieldOffset(SMBMemoryDevice, partNumber), kSMBMemoryDevicePartNumberKey, getSMBMemoryDevicePartNumber, NULL}, Index: branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_decode.c =================================================================== --- branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_decode.c (revision 2147) +++ branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_decode.c (revision 2148) @@ -165,6 +165,7 @@ if (minorVersion < 3 || structHeader->header.length < 27) return; DBG("\tmemorySpeed: %dMHz\n", structHeader->memorySpeed); + DBG("\terrorHandle: %x\n", structHeader->errorHandle); DBG("\tmanufacturer: %s\n", getSMBStringForField((SMBStructHeader *)structHeader, structHeader->manufacturer)); DBG("\tserialNumber: %s\n", getSMBStringForField((SMBStructHeader *)structHeader, structHeader->serialNumber)); DBG("\tassetTag: %s\n", getSMBStringForField((SMBStructHeader *)structHeader, structHeader->assetTag)); @@ -257,7 +258,9 @@ for (; ((uint16_t *)ptr)[0] != 0; ptr++); if (((uint16_t *)ptr)[0] == 0) + { ptr += 2; + } structHeader = (SMBStructHeader *)ptr; } Index: branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_getters.c =================================================================== --- branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_getters.c (revision 2147) +++ branches/ErmaC/MainTrunkPatch/i386/libsaio/smbios_getters.c (revision 2148) @@ -22,7 +22,7 @@ bool getProcessorInformationExternalClock(returnType *value) { if (Platform.CPU.Vendor == CPUID_VENDOR_INTEL) // Intel - { + { switch (Platform.CPU.Family) { case 0x06: @@ -30,8 +30,8 @@ switch (Platform.CPU.Model) { // set external clock to 0 for SANDY - // removes FSB info from system profiler as on real mac's. - case CPU_MODEL_SANDYBRIDGE: + // removes FSB info from system profiler as on real mac's. + case CPU_MODEL_SANDYBRIDGE: case CPU_MODEL_IVYBRIDGE: value->word = 0; break; @@ -40,7 +40,7 @@ } } break; - + default: value->word = Platform.CPU.FSBFrequency/1000000; } @@ -109,7 +109,10 @@ DBG("qpimult %d\n", qpimult); qpibusspeed = (qpimult * 2 * (Platform.CPU.FSBFrequency/1000000)); // Rek: rounding decimals to match original mac profile info - if (qpibusspeed%100 != 0)qpibusspeed = ((qpibusspeed+50)/100)*100; + if (qpibusspeed%100 != 0) + { + qpibusspeed = ((qpibusspeed+50)/100)*100; + } DBG("qpibusspeed %d\n", qpibusspeed); value->word = qpibusspeed; return true; @@ -148,7 +151,7 @@ verbose("CPU is %s, family 0x%x, model 0x%x\n", Platform.CPU.BrandString, Platform.CPU.Family, Platform.CPU.Model); done = true; } - + switch (Platform.CPU.Family) { case 0x06: @@ -167,26 +170,42 @@ case CPU_MODEL_WESTMERE_EX: // Intel Xeon E7 case CPU_MODEL_JAKETOWN: // Intel Core i7, Xeon E5 LGA2011 (32nm) if (strstr(Platform.CPU.BrandString, "Xeon(R)")) - value->word = 0x0501; // Xeon + { + value->word = 0x0501; // Xeon + } else + { value->word = 0x0701; // Core i7 + } return true; case CPU_MODEL_FIELDS: // Intel Core i5, i7, Xeon X34xx LGA1156 (45nm) if (strstr(Platform.CPU.BrandString, "Xeon(R)")) - value->word = 0x0501;// Xeon + { + value->word = 0x0501; // Xeon + } else + { if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) - value->word = 0x0601; // Core i5 + { + value->word = 0x0601; // Core i5 + } else - value->word = 0x0701; // Core i7 + { + value->word = 0x0701; // Core i7 + } + } return true; case CPU_MODEL_DALES: if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + { value->word = 0x0601; // Core i5 + } else + { value->word = 0x0701; // Core i7 + } return true; case CPU_MODEL_SANDYBRIDGE: // Intel Core i3, i5, i7 LGA1155 (32nm) @@ -230,6 +249,12 @@ // return true; } +bool getSMBMemoryDeviceMemoryErrorHandle(returnType *value) +{ + value->word = 0xFFFF; + return true; +} + bool getSMBMemoryDeviceMemorySpeed(returnType *value) { static int idx = -1; @@ -270,7 +295,9 @@ } if (!bootInfo->memDetect) + { return false; + } value->string = NOT_AVAILABLE; return true; } @@ -296,7 +323,9 @@ } if (!bootInfo->memDetect) + { return false; + } value->string = NOT_AVAILABLE; return true; } @@ -319,7 +348,9 @@ } if (!bootInfo->memDetect) + { return false; + } value->string = NOT_AVAILABLE; return true; }