forked from I2P_Developers/i2p.i2p
CPUID: Fix Intel processor identification
This commit is contained in:
@@ -277,13 +277,19 @@ public class CPUID {
|
||||
String mname = getCPUModelName();
|
||||
if (mname != null)
|
||||
System.out.println("CPU Model Name: " + mname);
|
||||
System.out.println("CPU Vendor: " + getCPUVendorID());
|
||||
String vendor = getCPUVendorID();
|
||||
System.out.println("CPU Vendor: " + vendor);
|
||||
// http://en.wikipedia.org/wiki/Cpuid
|
||||
// http://web.archive.org/web/20110307080258/http://www.intel.com/Assets/PDF/appnote/241618.pdf
|
||||
// http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf
|
||||
int family = getCPUFamily();
|
||||
int model = getCPUModel();
|
||||
if (family == 15 ||
|
||||
(family == 6 && "GenuineIntel".equals(vendor))) {
|
||||
model += getCPUExtendedModel() << 4;
|
||||
}
|
||||
if (family == 15) {
|
||||
family += getCPUExtendedFamily();
|
||||
model += getCPUExtendedModel() << 4;
|
||||
}
|
||||
System.out.println("CPU Family: " + family);
|
||||
System.out.println("CPU Model: " + model);
|
||||
|
@@ -59,12 +59,18 @@ class IntelInfoImpl extends CPUIDCPUInfo implements IntelCPUInfo
|
||||
private static String identifyCPU()
|
||||
{
|
||||
// http://en.wikipedia.org/wiki/Cpuid
|
||||
// http://web.archive.org/web/20110307080258/http://www.intel.com/Assets/PDF/appnote/241618.pdf
|
||||
// http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf
|
||||
String modelString = null;
|
||||
int family = CPUID.getCPUFamily();
|
||||
int model = CPUID.getCPUModel();
|
||||
if (family == 15 || family == 6) {
|
||||
// Intel uses extended model for family = 15 or family = 6,
|
||||
// which is not what wikipedia says
|
||||
model += CPUID.getCPUExtendedModel() << 4;
|
||||
}
|
||||
if (family == 15) {
|
||||
family += CPUID.getCPUExtendedFamily();
|
||||
model += CPUID.getCPUExtendedModel() << 4;
|
||||
}
|
||||
|
||||
switch (family) {
|
||||
@@ -160,6 +166,17 @@ class IntelInfoImpl extends CPUIDCPUInfo implements IntelCPUInfo
|
||||
case 1:
|
||||
modelString = "Pentium Pro";
|
||||
break;
|
||||
// Nehalem 45 nm
|
||||
// As reported; can't find in any CPUID charts
|
||||
case 2:
|
||||
isPentium2Compatible = true;
|
||||
isPentium3Compatible = true;
|
||||
isPentiumMCompatible = true;
|
||||
isCore2Compatible = true;
|
||||
isCoreiCompatible = true;
|
||||
isX64 = true;
|
||||
modelString = "Core i7 (45nm)";
|
||||
break;
|
||||
case 3:
|
||||
isPentium2Compatible = true;
|
||||
modelString = "Pentium II (Klamath)";
|
||||
|
@@ -1,3 +1,8 @@
|
||||
2014-10-03 zzz
|
||||
* Console: New add-to-addressbook links on leaseset page
|
||||
* CPUID: Fix Intel processor identification
|
||||
* i2psnark: Fix adding magnet links with % encoding (ticket #1391)
|
||||
|
||||
2014-09-30 zzz
|
||||
* Logs: Fix displayed filename when empty (ticket #1386)
|
||||
* SAM: Fix v3 LS publish, broken in -4 (ticket #1390)
|
||||
|
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 5;
|
||||
public final static long BUILD = 6;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
Reference in New Issue
Block a user