java.lang.Object
freenet.support.CPUInformation.CPUIDCPUInfo
freenet.support.CPUInformation.AMDInfoImpl
All Implemented Interfaces:
AMDCPUInfo, CPUInfo

class AMDInfoImplextends CPUIDCPUInfo implements AMDCPUInfo
Moved out of CPUID.java Ref: https://en.wikipedia.org/wiki/List_of_AMD_CPU_microarchitectures Ref: https://gmplib.org/repo/gmp/file/tip/config.guess
  • Field Details

    • isK6Compatible

      private static boolean isK6Compatible
      True if the CPU is a K6 or later AMD.
    • isK6_2_Compatible

      private static boolean isK6_2_Compatible
      True if the CPU is a K6-2 or later AMD.
    • isK6_3_Compatible

      private static boolean isK6_3_Compatible
      True if the CPU is a K6-III or later AMD.
    • isGeodeCompatible

      private static boolean isGeodeCompatible
      True if the CPU is a Geode or later AMD.
    • isAthlonCompatible

      private static boolean isAthlonCompatible
      True if the CPU is an Athlon or later AMD.
    • isAthlon64Compatible

      private static boolean isAthlon64Compatible
      True if the CPU is an Athlon 64 or later AMD.
    • isK10Compatible

      private static boolean isK10Compatible
      True if the CPU uses the K10 family or later.
    • isBobcatCompatible

      private static boolean isBobcatCompatible
      True if the CPU is a Bobcat or later AMD.
    • isJaguarCompatible

      private static boolean isJaguarCompatible
      True if the CPU is a Jaguar or later AMD.
    • isBulldozerCompatible

      private static boolean isBulldozerCompatible
      True if the CPU is a Bulldozer or later AMD.
    • isPiledriverCompatible

      private static boolean isPiledriverCompatible
      True if the CPU is a Piledriver or later AMD.
    • isSteamrollerCompatible

      private static boolean isSteamrollerCompatible
      True if the CPU is a Steamroller or later AMD.
    • isExcavatorCompatible

      private static boolean isExcavatorCompatible
      True if the CPU is an Excavator or later AMD.
    • isZenCompatible

      private static boolean isZenCompatible
      True if the CPU uses the Zen family or later.
    • isZen2Compatible

      private static boolean isZen2Compatible
      True if the CPU uses the Zen 2 family or later.
    • isZen3Compatible

      private static boolean isZen3Compatible
      True if the CPU uses the Zen 3 family or later.
    • isZen4Compatible

      private static boolean isZen4Compatible
      True if the CPU uses the Zen 4 family or later.
    • isZen5Compatible

      private static boolean isZen5Compatible
      True if the CPU uses the Zen 5 family or later.
  • Constructor Details

    • AMDInfoImpl

      public AMDInfoImpl()
      No-op, all state is static.
  • Method Details

    • IsK6Compatible

      public boolean IsK6Compatible()
      Whether the CPU is at least a K6.
      Specified by:
      IsK6Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a 'k6' CPU
    • IsK6_2_Compatible

      public boolean IsK6_2_Compatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'k6-2' CPU.
      Specified by:
      IsK6_2_Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'k6-2' CPU
    • IsK6_3_Compatible

      public boolean IsK6_3_Compatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'k6-3' CPU.
      Specified by:
      IsK6_3_Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'k6-3' CPU
    • IsGeodeCompatible

      public boolean IsGeodeCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'geode' CPU.
      Specified by:
      IsGeodeCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'geode' CPU
    • IsAthlonCompatible

      public boolean IsAthlonCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'k7' CPU (Athlon, Duron etc. and better).
      Specified by:
      IsAthlonCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'k7' CPU (Atlhon, Duron etc. and better)
    • IsAthlon64Compatible

      public boolean IsAthlon64Compatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'k8' CPU (Athlon 64, Opteron etc. and better).
      Specified by:
      IsAthlon64Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'k8' CPU (Atlhon 64, Opteron etc. and better)
    • IsK10Compatible

      public boolean IsK10Compatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'k10' CPU.
      Specified by:
      IsK10Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'k10' CPU
    • IsBobcatCompatible

      public boolean IsBobcatCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'bobcat' CPU.
      Specified by:
      IsBobcatCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'bobcat' CPU
    • IsJaguarCompatible

      public boolean IsJaguarCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'jaguar' CPU.
      Specified by:
      IsJaguarCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least an 'jaguar' CPU
    • IsBulldozerCompatible

      public boolean IsBulldozerCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'bulldozer' CPU.
      Specified by:
      IsBulldozerCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a 'bulldozer' CPU
    • IsPiledriverCompatible

      public boolean IsPiledriverCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'piledriver' CPU.
      Specified by:
      IsPiledriverCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a 'piledriver' CPU
    • IsSteamrollerCompatible

      public boolean IsSteamrollerCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least a 'steamroller' CPU.
      Specified by:
      IsSteamrollerCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a 'steamroller' CPU
    • IsExcavatorCompatible

      public boolean IsExcavatorCompatible()
      Description copied from interface: AMDCPUInfo
      Checks if the CPU is at least an 'excavator' CPU.
      Specified by:
      IsExcavatorCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a 'excavator' CPU
    • IsZenCompatible

      public boolean IsZenCompatible()
      Whether the CPU is at least Zen.
      Specified by:
      IsZenCompatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a Zen family CPU
    • IsZen2Compatible

      public boolean IsZen2Compatible()
      Whether the CPU is at least Zen 2.
      Specified by:
      IsZen2Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a Zen2 family CPU
    • IsZen3Compatible

      public boolean IsZen3Compatible()
      Whether the CPU is at least Zen 3.
      Specified by:
      IsZen3Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a Zen3 family CPU
    • IsZen4Compatible

      public boolean IsZen4Compatible()
      Whether the CPU is at least Zen 4.
      Specified by:
      IsZen4Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a Zen4 family CPU
    • IsZen5Compatible

      public boolean IsZen5Compatible()
      Whether the CPU is at least Zen 5.
      Specified by:
      IsZen5Compatible in interface AMDCPUInfo
      Returns:
      true if the CPU present in the machine is at least a Zen5 family CPU
    • getCPUModelString

      public String getCPUModelString() throws UnknownCPUException
      Description copied from interface: CPUInfo
      Gets the CPU model description.
      Specified by:
      getCPUModelString in interface CPUInfo
      Overrides:
      getCPUModelString in class CPUIDCPUInfo
      Returns:
      A string detailing what type of CPU that is present in the machine. I.e. 'Pentium IV' etc.
      Throws:
      UnknownCPUException - If for any reason the retrieval of the requested information failed. The message encapsulated in the exception indicates the cause of the failure.
    • identifyCPU

      private String identifyCPU()
      Finds the CPU's model name from the vendor data.
      Returns:
      the model name, null if unknown
    • identifyCPUByModel

      String identifyCPUByModel(int family, int model, int extFamily, int extModel)
      Sets the instruction-set compatibility flags from the raw CPUID family and model numbers, and returns the microarchitecture guessed from them. The flags are static, so they are cleared first: this runs more than once per JVM (the jbigi probe and the router's processor-change check), and a second call must not inherit the first result.

      Package visible and parameterised so the family and model table can be tested without a CPU to probe. A few pre-Zen families also consult live CPUID feature bits, so only the Zen ranges are fully reproducible.

      Parameters:
      family - the CPUID base family
      model - the CPUID base model
      extFamily - the CPUID extended family, added to a base family of 15
      extModel - the CPUID extended model, folded into the model in that case
      Returns:
      the microarchitecture name, or null if the family is unknown