- Timestamp:
- Jun 6, 2019 1:28:44 PM (21 months ago)
- Branches:
- master
- Children:
- 75ace42
- Parents:
- 6d72aee
- Location:
- core/java/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/freenet/support/CPUInformation/CPUID.java
r6d72aee re82a547 341 341 } 342 342 System.out.println("JCPUID Version: " + _jcpuidVersion); 343 System.out.println(" 343 System.out.println("**CPUInfo**"); 344 344 String mname = getCPUModelName(); 345 345 if (mname != null) 346 System.out.println("CPU Model Name:" + mname);346 System.out.println("CPU Name: " + mname); 347 347 String vendor = getCPUVendorID(); 348 System.out.println("CPU Vendor: " + vendor);348 System.out.println("CPU Vendor: " + vendor); 349 349 // http://en.wikipedia.org/wiki/Cpuid 350 350 // http://web.archive.org/web/20110307080258/http://www.intel.com/Assets/PDF/appnote/241618.pdf … … 359 359 family += getCPUExtendedFamily(); 360 360 } 361 System.out.println("CPU Family: " + family);362 System.out.println("CPU Model: " + model);361 System.out.println("CPU Family: " + family); 362 System.out.println("CPU Model: " + model + " (0x" + Integer.toHexString(model) + ')'); 363 363 System.out.println("CPU Stepping: " + getCPUStepping()); 364 364 System.out.println("CPU Flags (EDX): 0x" + Integer.toHexString(getEDXCPUFlags())); … … 370 370 371 371 CPUInfo c = getInfo(); 372 System.out.println("\n 373 System.out.println("CPU model string: " + c.getCPUModelString());372 System.out.println("\n**More CPUInfo**"); 373 System.out.println("CPU model name: " + c.getCPUModelString()); 374 374 System.out.println("CPU has MMX: " + c.hasMMX()); 375 375 System.out.println("CPU has SSE: " + c.hasSSE()); … … 391 391 System.out.println("CPU has ABM: " + c.hasABM()); 392 392 if(c instanceof IntelCPUInfo){ 393 System.out.println("\n **Intel-info**"); 394 System.out.println("Is PII-compatible: "+((IntelCPUInfo)c).IsPentium2Compatible()); 395 System.out.println("Is PIII-compatible: "+((IntelCPUInfo)c).IsPentium3Compatible()); 396 System.out.println("Is PIV-compatible: "+((IntelCPUInfo)c).IsPentium4Compatible()); 397 System.out.println("Is Atom-compatible: "+((IntelCPUInfo)c).IsAtomCompatible()); 398 System.out.println("Is Pentium M compatible: "+((IntelCPUInfo)c).IsPentiumMCompatible()); 399 System.out.println("Is Core2-compatible: "+((IntelCPUInfo)c).IsCore2Compatible()); 400 System.out.println("Is Corei-compatible: "+((IntelCPUInfo)c).IsCoreiCompatible()); 401 System.out.println("Is Sandy-compatible: "+((IntelCPUInfo)c).IsSandyCompatible()); 402 System.out.println("Is Ivy-compatible: "+((IntelCPUInfo)c).IsIvyCompatible()); 403 System.out.println("Is Haswell-compatible: "+((IntelCPUInfo)c).IsHaswellCompatible()); 404 System.out.println("Is Broadwell-compatible: "+((IntelCPUInfo)c).IsBroadwellCompatible()); 405 } 406 if(c instanceof AMDCPUInfo){ 407 System.out.println("\n **AMD-info**"); 408 System.out.println("Is K6-compatible: "+((AMDCPUInfo)c).IsK6Compatible()); 409 System.out.println("Is K6_2-compatible: "+((AMDCPUInfo)c).IsK6_2_Compatible()); 410 System.out.println("Is K6_3-compatible: "+((AMDCPUInfo)c).IsK6_3_Compatible()); 411 System.out.println("Is Geode-compatible: "+((AMDCPUInfo)c).IsGeodeCompatible()); 412 System.out.println("Is Athlon-compatible: "+((AMDCPUInfo)c).IsAthlonCompatible()); 413 System.out.println("Is Athlon64-compatible: "+((AMDCPUInfo)c).IsAthlon64Compatible()); 414 System.out.println("Is Bobcat-compatible: "+((AMDCPUInfo)c).IsBobcatCompatible()); 415 System.out.println("Is K10-compatible: "+((AMDCPUInfo)c).IsK10Compatible()); 416 System.out.println("Is Jaguar-compatible: "+((AMDCPUInfo)c).IsJaguarCompatible()); 417 System.out.println("Is Bulldozer-compatible: "+((AMDCPUInfo)c).IsBulldozerCompatible()); 418 System.out.println("Is Piledriver-compatible: "+((AMDCPUInfo)c).IsPiledriverCompatible()); 419 System.out.println("Is Steamroller-compatible: "+((AMDCPUInfo)c).IsSteamrollerCompatible()); 420 System.out.println("Is Excavator-compatible: "+((AMDCPUInfo)c).IsExcavatorCompatible()); 393 IntelCPUInfo cc = (IntelCPUInfo) c; 394 System.out.println("\n**Intel-info**"); 395 System.out.println("Is PII-compatible: " + cc.IsPentium2Compatible()); 396 System.out.println("Is PIII-compatible: " + cc.IsPentium3Compatible()); 397 System.out.println("Is PIV-compatible: " + cc.IsPentium4Compatible()); 398 System.out.println("Is Atom-compatible: " + cc.IsAtomCompatible()); 399 System.out.println("Is Pentium M compatible: " + cc.IsPentiumMCompatible()); 400 System.out.println("Is Core2-compatible: " + cc.IsCore2Compatible()); 401 System.out.println("Is Corei-compatible: " + cc.IsCoreiCompatible()); 402 System.out.println("Is Sandy-compatible: " + cc.IsSandyCompatible()); 403 System.out.println("Is Ivy-compatible: " + cc.IsIvyCompatible()); 404 System.out.println("Is Haswell-compatible: " + cc.IsHaswellCompatible()); 405 System.out.println("Is Broadwell-compatible: " + cc.IsBroadwellCompatible()); 406 System.out.println("Is Skylake-compatible: " + cc.IsSkylakeCompatible()); 407 } else if (c instanceof AMDCPUInfo) { 408 AMDCPUInfo cc = (AMDCPUInfo) c; 409 System.out.println("\n**AMD-info**"); 410 System.out.println("Is K6-compatible: " + cc.IsK6Compatible()); 411 System.out.println("Is K6_2-compatible: " + cc.IsK6_2_Compatible()); 412 System.out.println("Is K6_3-compatible: " + cc.IsK6_3_Compatible()); 413 System.out.println("Is Geode-compatible: " + cc.IsGeodeCompatible()); 414 System.out.println("Is Athlon-compatible: " + cc.IsAthlonCompatible()); 415 System.out.println("Is Athlon64-compatible: " + cc.IsAthlon64Compatible()); 416 System.out.println("Is Bobcat-compatible: " + cc.IsBobcatCompatible()); 417 System.out.println("Is K10-compatible: " + cc.IsK10Compatible()); 418 System.out.println("Is Jaguar-compatible: " + cc.IsJaguarCompatible()); 419 System.out.println("Is Bulldozer-compatible: " + cc.IsBulldozerCompatible()); 420 System.out.println("Is Piledriver-compatible: " + cc.IsPiledriverCompatible()); 421 System.out.println("Is Steamroller-compatible: " + cc.IsSteamrollerCompatible()); 422 System.out.println("Is Excavator-compatible: " + cc.IsExcavatorCompatible()); 421 423 } 422 424 } -
core/java/src/freenet/support/CPUInformation/IntelCPUInfo.java
r6d72aee re82a547 140 140 */ 141 141 public boolean IsBroadwellCompatible(); 142 143 /** 144 * Supports the AVX-512 instrutions. 145 * 146 * @since 0.9.41 147 */ 148 public boolean IsSkylakeCompatible(); 142 149 } -
core/java/src/freenet/support/CPUInformation/IntelInfoImpl.java
r6d72aee re82a547 24 24 private static boolean isHaswellCompatible; 25 25 private static boolean isBroadwellCompatible; 26 private static boolean isSkylakeCompatible; 26 27 27 28 // If modelString != null, the cpu is considered correctly identified. … … 40 41 public boolean IsHaswellCompatible(){ return isHaswellCompatible; } 41 42 public boolean IsBroadwellCompatible(){ return isBroadwellCompatible; } 43 /** 44 * Supports the AVX-512 instrutions. 45 * @since 0.9.41 46 */ 47 public boolean IsSkylakeCompatible() { return isSkylakeCompatible; } 42 48 43 49 public String getCPUModelString() throws UnknownCPUException … … 62 68 // Intel uses extended model for family = 15 or family = 6, 63 69 // which is not what wikipedia says 70 // we construct the model from EAX as follows: 71 // ext. model is 5th byte, base model is 2nd byte 72 // So e.g. for a published CPUID value of "306C1" 73 // the model here would be 0x3c, it's a Haswell. 64 74 model += CPUID.getCPUExtendedModel() << 4; 65 75 } … … 440 450 case 0x4e: 441 451 case 0x55: 442 case 0x5e: { 452 case 0x5c: // Apollo Lake 453 case 0x5e: 454 case 0x66: // Cannon Lake 455 case 0x67: // Cannon Lake 456 case 0x6c: // Apollo Lake 457 { 443 458 CPUIDCPUInfo c = new CPUIDCPUInfo(); 444 459 if (c.hasAVX2() && c.hasBMI1() && c.hasBMI2() && … … 447 462 isIvyCompatible = true; 448 463 isHaswellCompatible = true; 449 if (c.hasADX()) 464 if (c.hasADX()) { 450 465 isBroadwellCompatible = true; 466 if (c.hasAVX512()) 467 isSkylakeCompatible = true; 468 } 451 469 modelString = "Skylake Core i3/i5/i7"; 452 470 } else { … … 464 482 } 465 483 484 485 // TODO case 0x5f: // Goldmont / Atom 486 // TODO case 0x7a: // Gemini Lake 487 // TODO case 0x7e: // Ice Lake 488 489 466 490 // following are for extended model == 8 or 9 467 491 // most flags are set above … … 470 494 // Kaby Lake 471 495 // ref: https://github.com/InstLatx64/InstLatx64/commit/9d2ea1a9eb727868dc514900da9e2f175710f9bf 496 // ref: https://github.com/InstLatx64/InstLatx64/blob/master/ChangeLog.htm 497 // ref: https://github.com/coreboot/coreboot/blob/master/src/soc/intel/common/block/include/intelblocks/mp_init.h 472 498 // See Haswell notes above 473 case 0x8e: 474 case 0x9e: { 499 case 0x8e: // also Whiskey Lake, Coffee Lake 500 case 0x9e: // also Whiskey Lake, Coffee Lake 501 case 0xa5: // Comet Lake 502 case 0xa6: // Comet Lake 503 { 475 504 CPUIDCPUInfo c = new CPUIDCPUInfo(); 476 505 if (c.hasAVX2() && c.hasBMI1() && c.hasBMI2() && … … 479 508 isIvyCompatible = true; 480 509 isHaswellCompatible = true; 481 if (c.hasADX()) 510 if (c.hasADX()) { 482 511 isBroadwellCompatible = true; 512 if (c.hasAVX512()) 513 isSkylakeCompatible = true; 514 } 483 515 modelString = "Kaby Lake Core i3/i5/i7"; 484 516 } else { -
core/java/src/net/i2p/util/NativeBigInteger.java
r6d72aee re82a547 173 173 private final static String JBIGI_OPTIMIZATION_BOBCAT = "bobcat"; 174 174 private final static String JBIGI_OPTIMIZATION_JAGUAR = "jaguar"; 175 /** @since 0.9.41 */ 176 private final static String JBIGI_OPTIMIZATION_SKYLAKE = "skylake"; 175 177 176 178 /** … … 234 236 JBIGI_OPTIMIZATION_PENTIUM2, JBIGI_OPTIMIZATION_PENTIUMMMX, JBIGI_OPTIMIZATION_PENTIUM, 235 237 JBIGI_OPTIMIZATION_X86}; 236 private final static String[] JBIGI_COMPAT_LIST_INTEL_CORE = {JBIGI_OPTIMIZATION_COREI_BWL, JBIGI_OPTIMIZATION_COREI_HWL, JBIGI_OPTIMIZATION_COREI_SBR, 238 private final static String[] JBIGI_COMPAT_LIST_INTEL_CORE = {JBIGI_OPTIMIZATION_SKYLAKE, 239 JBIGI_OPTIMIZATION_COREI_BWL, JBIGI_OPTIMIZATION_COREI_HWL, JBIGI_OPTIMIZATION_COREI_SBR, 237 240 JBIGI_OPTIMIZATION_COREI, JBIGI_OPTIMIZATION_CORE2, JBIGI_OPTIMIZATION_PENTIUMM, 238 241 JBIGI_OPTIMIZATION_PENTIUM3, JBIGI_OPTIMIZATION_X86}; … … 294 297 put(JBIGI_OPTIMIZATION_COREI_HWL, JBIGI_COMPAT_LIST_INTEL_CORE); 295 298 put(JBIGI_OPTIMIZATION_COREI_BWL, JBIGI_COMPAT_LIST_INTEL_CORE); 299 put(JBIGI_OPTIMIZATION_SKYLAKE, JBIGI_COMPAT_LIST_INTEL_CORE); 296 300 }}; 297 301 … … 388 392 } else if (c instanceof IntelCPUInfo) { 389 393 IntelCPUInfo intelcpu = (IntelCPUInfo) c; 394 if (intelcpu.IsSkylakeCompatible()) 395 return JBIGI_OPTIMIZATION_SKYLAKE; 390 396 if (intelcpu.IsBroadwellCompatible()) 391 397 return JBIGI_OPTIMIZATION_COREI_BWL;
Note: See TracChangeset
for help on using the changeset viewer.