diff --git a/core/java/src/freenet/support/CPUInformation/CPUID.java b/core/java/src/freenet/support/CPUInformation/CPUID.java index 37338e9d1..0140eb92c 100644 --- a/core/java/src/freenet/support/CPUInformation/CPUID.java +++ b/core/java/src/freenet/support/CPUInformation/CPUID.java @@ -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); diff --git a/core/java/src/freenet/support/CPUInformation/IntelInfoImpl.java b/core/java/src/freenet/support/CPUInformation/IntelInfoImpl.java index 50472bd69..a504c3056 100644 --- a/core/java/src/freenet/support/CPUInformation/IntelInfoImpl.java +++ b/core/java/src/freenet/support/CPUInformation/IntelInfoImpl.java @@ -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)"; diff --git a/history.txt b/history.txt index 3cdb560ec..cf8b5f00f 100644 --- a/history.txt +++ b/history.txt @@ -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) diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 4e28a2c8d..c10128fe6 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -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 = "";