Index: branches/ErmaC/Enoch/i386/libsaio/smbios_getters.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/smbios_getters.c (revision 2472) +++ branches/ErmaC/Enoch/i386/libsaio/smbios_getters.c (revision 2473) @@ -18,7 +18,12 @@ #define DBG(x...) #endif +#define XEON "Xeon" +#define CORE_I3 "Core(TM) i3" +#define CORE_I5 "Core(TM) i5" +#define CORE_I7 "Core(TM) i7" + bool getProcessorInformationExternalClock(returnType *value) { if (Platform.CPU.Vendor == CPUID_VENDOR_INTEL) // Intel @@ -183,7 +188,7 @@ case CPUID_MODEL_DOTHAN: // 0x0D - Intel Pentium M model D case CPUID_MODEL_PRESCOTT: case CPUID_MODEL_NOCONA: - if (strstr(Platform.CPU.BrandString, "Xeon")) + if (strstr(Platform.CPU.BrandString, XEON)) { value->word = 0x402; // 1026 - Xeon } @@ -198,7 +203,7 @@ case CPUID_MODEL_MEROM: // 0x0F - Intel Mobile Core 2 Solo, Duo, Xeon 30xx, Xeon 51xx, Xeon X53xx, Xeon E53xx, Xeon X32xx case CPUID_MODEL_XEON_MP: // 0x1D - Six-Core Xeon 7400, "Dunnington", 45nm case CPUID_MODEL_PENRYN: // 0x17 - Intel Core 2 Solo, Duo, Quad, Extreme, Xeon X54xx, Xeon X33xx - if (strstr(Platform.CPU.BrandString, "Xeon")) + if (strstr(Platform.CPU.BrandString, XEON)) { value->word = 0x402; // 1026 - Xeon return true; @@ -221,22 +226,22 @@ case CPUID_MODEL_NEHALEM: // 0x1A - Intel Core i7, Xeon W35xx, Xeon X55xx, Xeon E55xx LGA1366 (45nm) case CPUID_MODEL_FIELDS: // 0x1E - Intel Core i5, i7, Xeon X34xx LGA1156 (45nm) case CPUID_MODEL_DALES: // 0x1F - Intel Core i5, i7 LGA1156 (45nm) (Havendale, Auburndale) - if (strstr(Platform.CPU.BrandString, "Xeon")) + if (strstr(Platform.CPU.BrandString, XEON)) { value->word = 0x501; // 1281 - Lynnfiled Quad-Core Xeon return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i3")) + if (strstr(Platform.CPU.BrandString, CORE_I3)) { value->word = 0x901; // 2305 - Core i3 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform.CPU.BrandString, CORE_I5)) { value->word = 0x601; // Core i5 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i7")) + if (strstr(Platform.CPU.BrandString, CORE_I7)) { value->word = 0x701; // 1793 - Core i7 return true; @@ -250,22 +255,22 @@ case CPUID_MODEL_DALES_32NM: // 0x25 - Intel Core i3, i5 LGA1156 (32nm) (Clarkdale, Arrandale) case CPUID_MODEL_WESTMERE: // 0x2C - Intel Core i7, Xeon X56xx, Xeon E56xx, Xeon W36xx LGA1366 (32nm) 6 Core case CPUID_MODEL_WESTMERE_EX: // 0x2F - Intel Xeon E7 - if (strstr(Platform.CPU.BrandString, "Xeon")) + if (strstr(Platform.CPU.BrandString, XEON)) { value->word = 0x501; // 1281 - Xeon return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i3")) + if (strstr(Platform.CPU.BrandString, CORE_I3)) { value->word = 0x901; // 2305 - Core i3 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform.CPU.BrandString, CORE_I5)) { value->word = 0x602; // 1538 - Core i5 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i7")) + if (strstr(Platform.CPU.BrandString, CORE_I7)) { value->word = 0x702; // 1794 -Core i7 return true; @@ -278,22 +283,22 @@ case CPUID_MODEL_JAKETOWN: // 0x2D - Intel Core i7, Xeon E5-xxxx LGA2011 (32nm) case CPUID_MODEL_SANDYBRIDGE: // 0x2A - Intel Core i3, i5, i7 LGA1155 (32nm) - if (strstr(Platform.CPU.BrandString, "Xeon")) + if (strstr(Platform.CPU.BrandString, XEON)) { value->word = 0x501; // 1281 - Xeon return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i3")) + if (strstr(Platform.CPU.BrandString, CORE_I3)) { value->word = 0x902; // 2306 -Core i3 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform.CPU.BrandString, CORE_I5)) { value->word = 0x603; // 1539 - Core i5 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i7")) + if (strstr(Platform.CPU.BrandString, CORE_I7)) { value->word = 0x703; // 1795 - Core i7 return true; @@ -305,22 +310,22 @@ return true; case CPUID_MODEL_IVYBRIDGE: // 0x3A - Intel Core i3, i5, i7 LGA1155 (22nm) - if (strstr(Platform.CPU.BrandString, "Xeon")) + if (strstr(Platform.CPU.BrandString, XEON)) { value->word = 0xA01; // 2561 - Xeon return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i3")) + if (strstr(Platform.CPU.BrandString, CORE_I3)) { value->word = 0x903; // 2307 - Core i3 - Apple doesn't use it return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform.CPU.BrandString, CORE_I5)) { value->word = 0x604; // 1540 - Core i5 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i7")) + if (strstr(Platform.CPU.BrandString, CORE_I7)) { value->word = 0x704; // 1796 - Core i7 return true; @@ -339,22 +344,22 @@ case CPUID_MODEL_HASWELL_SVR: // 0x3F - case CPUID_MODEL_HASWELL_ULT: // 0x45 - case CPUID_MODEL_CRYSTALWELL: // 0x46 - if (strstr(Platform.CPU.BrandString, "Xeon")) + if (strstr(Platform.CPU.BrandString, XEON)) { value->word = 0xA01; // 2561 - Xeon return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i3")) + if (strstr(Platform.CPU.BrandString, CORE_I3)) { value->word = 0x904; // 2308 - Core i3 - Apple doesn't use it - but we yes:-) return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i5")) + if (strstr(Platform.CPU.BrandString, CORE_I5)) { value->word = 0x605; // 1541 - Core i5 return true; } - if (strstr(Platform.CPU.BrandString, "Core(TM) i7")) + if (strstr(Platform.CPU.BrandString, CORE_I7)) { value->word = 0x705; // 1797 - Core i7 return true; Index: branches/ErmaC/Enoch/CHANGES =================================================================== --- branches/ErmaC/Enoch/CHANGES (revision 2472) +++ branches/ErmaC/Enoch/CHANGES (revision 2473) @@ -1,3 +1,4 @@ +- ErmaC : define recursive cpu series for BrandString - meklort : Update laoder.h to latest, declare gMI global, Load modules passed in via the multiboot header / first bootloader, Fix mboot.h include, Add ?log command to print out bdmesg without needing Wait=y, Add slightly more debugging for modules. - ErmaC : Rename CPU_MODEL_xxx into CPUID_MODEL_xxx follow Apple source name