libmir/mir-cpuid

wrong associative and cache sizes for AMD

Closed this issue · 1 comments

9il commented
################ Unified Information ################
Cores per CPU =  4
Threads per CPU =  4
------------------ TLB Information ------------------
Instruction TLB:
- - - - - ITLB1: - - - - - - - - - - - - - - - - - -
        Page size = 4 KB
        Pages count = 32
        Pages count = 32
        Associativity: 255-way associative
Data TLB:
- - - - - DTLB1: - - - - - - - - - - - - - - - - - -
        Page size = 4 KB
        Pages count = 48
        Pages count = 48
        Associativity: 255-way associative
- - - - - DTLB2: - - - - - - - - - - - - - - - - - -
        Page size = 4 KB
        Pages count = 128
        Pages count = 128
        Associativity: 2-way associative
Unified TLB:
----------------- Cache Information -----------------
Instruction Cache:
- - - - - ICahce1: - - - - - - - - - - - - - - - - -
        Cache size = 64 KB
        Line = 64 bytes
        Cores per cache = 1
        Inclusive: false
        Associativity: 2-way associative
Data Cahce:
- - - - - DCahce1: - - - - - - - - - - - - - - - - -
        Cache size = 64 KB
        Line = 64 bytes
        Cores per cache = 1
        Inclusive: false
        Associativity: 2-way associative
Unified Cahce:
- - - - - UCahce1: - - - - - - - - - - - - - - - - -
        Cache size = 512 KB
        Line = 64 bytes
        Cores per cache = 1
        Inclusive: false
        Associativity: 8-way associative
- - - - - UCahce2: - - - - - - - - - - - - - - - - -
        Cache size = 12 KB
        Line = 64 bytes
        Cores per cache = 4
        Inclusive: false
        Associativity: 11-way associative

################## x86 Information ##################
              vendor: AuthenticAMD
               brand: AMD Phenom(tm) II X4 B95 Processor
         vendorIndex: 0x5
          brandIndex: 0x0
        maxBasicLeaf: 0x5
     maxExtendedLeaf: 0x8000001B
     clflushLineSize: 0x8
maxLogicalProcessors: 0x4
         initialAPIC: 0x3
            stepping: 0x2
               model: 0x4
              family: 0xF
                type: 0x0
       extendedModel: 0x0
      extendedFamily: 0x1
                sse3: true
           pclmulqdq: false
              dtes64: false
             monitor: true
              ds_cpl: false
                 vmx: false
                 smx: false
                eist: false
                 tm2: false
               ssse3: false
             cnxt_id: false
                sdbg: false
                 fma: false
          cmpxchg16b: true
                xtpr: false
                pdcm: false
                pcid: false
                 dca: false
               sse41: false
               sse42: false
              x2apic: false
               movbe: false
              popcnt: true
        tsc_deadline: false
                 aes: false
               xsave: false
             osxsave: false
                 avx: false
                f16c: false
              rdrand: false
                 fpu: true
                 vme: true
                  de: true
                 pse: true
                 tsc: true
                 msr: true
                 pae: true
                 mce: true
                 cx8: true
                apic: true
                 sep: true
                mtrr: true
                 pge: true
                 mca: true
                cmov: true
                 pat: true
               pse36: true
                 psn: false
               clfsh: true
                  ds: false
                acpi: false
                 mmx: true
                fxsr: true
                 sse: true
                sse2: true
                  ss: false
                 htt: true
                  tm: false
                 pbe: false

All unit tests have been run successfully.

Looks good:

Running .dub/packages/cpuid-0.2.2/cpuid/__test__library__ 
################ Unified Information ################
Cores per CPU =  4
Threads per CPU =  4
------------------ TLB Information ------------------
Instruction TLB:
- - - - - ITLB1: - - - - - - - - - - - - - - - - - -
        Page size = 4 KB
        Pages count = 32
        Pages count = 32
        Associativity: Fully associative
Data TLB:
- - - - - DTLB1: - - - - - - - - - - - - - - - - - -
        Page size = 4 KB
        Pages count = 48
        Pages count = 48
        Associativity: Fully associative
- - - - - DTLB2: - - - - - - - - - - - - - - - - - -
        Page size = 4 KB
        Pages count = 128
        Pages count = 128
        Associativity: 2-way associative
Unified TLB:
----------------- Cache Information -----------------
Instruction Cache:
- - - - - ICahce1: - - - - - - - - - - - - - - - - -
        Cache size = 64 KB
        Line = 64 bytes
        Cores per cache = 1
        Inclusive: false
        Associativity: 2-way associative
Data Cahce:
- - - - - DCahce1: - - - - - - - - - - - - - - - - -
        Cache size = 64 KB
        Line = 64 bytes
        Cores per cache = 1
        Inclusive: false
        Associativity: 2-way associative
Unified Cahce:
- - - - - UCahce1: - - - - - - - - - - - - - - - - -
        Cache size = 512 KB
        Line = 64 bytes
        Cores per cache = 1
        Inclusive: false
        Associativity: 16-way associative
- - - - - UCahce2: - - - - - - - - - - - - - - - - -
        Cache size = 6144 KB
        Line = 64 bytes
        Cores per cache = 4
        Inclusive: false
        Associativity: 48-way associative

################## x86 Information ##################
              vendor: AuthenticAMD
               brand: AMD Phenom(tm) II X4 B95 Processor
         vendorIndex: 0x5
          brandIndex: 0x0
        maxBasicLeaf: 0x5
     maxExtendedLeaf: 0x8000001B
     clflushLineSize: 0x8
maxLogicalProcessors: 0x4
         initialAPIC: 0x1
            stepping: 0x2
               model: 0x4
              family: 0xF
                type: 0x0
       extendedModel: 0x0
      extendedFamily: 0x1
                sse3: true
           pclmulqdq: false
              dtes64: false
             monitor: true
              ds_cpl: false
                 vmx: false
                 smx: false
                eist: false
                 tm2: false
               ssse3: false
             cnxt_id: false
                sdbg: false
                 fma: false
          cmpxchg16b: true
                xtpr: false
                pdcm: false
                pcid: false
                 dca: false
               sse41: false
               sse42: false
              x2apic: false
               movbe: false
              popcnt: true
        tsc_deadline: false
                 aes: false
               xsave: false
             osxsave: false
                 avx: false
                f16c: false
              rdrand: false
                 fpu: true
                 vme: true
                  de: true
                 pse: true
                 tsc: true
                 msr: true
                 pae: true
                 mce: true
                 cx8: true
                apic: true
                 sep: true
                mtrr: true
                 pge: true
                 mca: true
                cmov: true
                 pat: true
               pse36: true
                 psn: false
               clfsh: true
                  ds: false
                acpi: false
                 mmx: true
                fxsr: true
                 sse: true
                sse2: true
                  ss: false
                 htt: true
                  tm: false
                 pbe: false

All unit tests have been run successfully.