a small C library for x86 CPU detection and feature extraction

Overview

libcpuid

libcpuid provides CPU identification for the x86 (and x86_64). For details about the programming API, you might want to take a look at the project's website on sourceforge (http://libcpuid.sourceforge.net/). There you'd find a short tutorial, as well as the full API reference.

Configuring after checkout

Under Linux, where you download the sources, there's no configure script to run. This is because it isn't a good practice to keep such scripts in a source control system. To create it, you need to run the following commands once, after you checkout the libcpuid sources from github:

    1. run "libtoolize"
    2. run "autoreconf --install"

You need to have autoconf, automake and libtool installed.

After that you can run ./configure and make - this will build the library.

make dist will create a tarball (with "configure" inside) with the sources.

Prerequisites

Using libcpuid requires no dependencies on any of the supported OSes. Building it requires the aforementioned libtool and autotools commands to be available, which is a matter of installing a few common packages with related names (e.g. automake, autoconf, libtool). It also requires a POSIX-compatible shell. On NetBSD, you may need to install one (credits to @brucelilly):

  1. Install a POSIX-compatible shell such as ksh93 (pkg_add ast-ksh || pkgin in ast-ksh)
  2. export CONFIG_SHELL=/usr/pkg/bin/ksh93 (substitute the correct path if required)
  3. Follow the regular Linux instructions

Testing

After any change to the detection routines or match tables, it's always a good idea to run make test. If some test fails, and you're confident that the test is wrong and needs fixing, run make fix-tests.

You can also add a new test (which is basically a file containing the raw CPUID data and the expected decoded items) by using tests/create_test.py. The workflow there is as follows:

  1. Run "cpuid_tool" with no arguments. It will tell you that it has written a pair of files, raw.txt and report.txt. Ensure that report.txt contains meaningful data.
  2. Run "tests/create_test.py raw.txt report.txt > «my-cpu».test"
  3. Use a proper descriptive name for the test (look into tests/amd and tests/intel to get an idea) and copy your test file to an appropriate place within the tests directory hierarchy.

For non-developers, who still want to contribute tests for the project, use this page to report misdetections or new CPUs that libcpuid doesn't handle well yet.

Users

So far, I'm aware of the following projects which utilize libcpuid (listed alphabetically):

We'd love to hear from you if you are also using libcpuid and want your project listed above.

Downloads

You can find latest versioned archives here, with binaries for macOS and Windows.

Binary packages

Also, libcpuid is available for following systems in official repositories:

Build tool

  • Vcpkg: vcpkg install cpuid
Comments
  • Propositional cleanups for cpu_msrinfo()

    Propositional cleanups for cpu_msrinfo()

    By my fault, the cpu_msrinfo() source code is unpleasant to read. Before doing something, I want your opinion.

    • The first idea is standardization: INFO_MPERF and INFO_APERF use a sub-function; why not do sub-functions for others? E.g. move INFO_CUR_MULTIPLIER in a static function like static double get_info_cur_multiplier().
    • The second idea is about model specific code, actually only CPU vendor is checked, but it's unclear when registers are not the same for all models (e.g. in INFO_CUR_MULTIPLIER, there is both code for newer Intel CPUs and older like Pentium III). Maybe use internal codes used in detection, or something like that?
    • The third idea is to try to improve existing source code in cpu_msrinfo().

    I close this issue, due to it is not an issue.

    opened by TheTumultuousUnicornOfDarkness 22
  • Intel Alder Lake processors are not properly recognized

    Intel Alder Lake processors are not properly recognized

    Alder Lake is Intel's codename for the 12th generation of Intel Core processors based on a hybrid architecture utilizing Golden Cove high-performance cores and Gracemont power-efficient cores.

    As reported on X0rg/CPU-X#205, Intel 12th CPUs are not properly recognized by libcpuid. Example with Intel® Core™ i7-12700KF:

      num_cores  : 10
      num_logical: 20
      tot_logical: 12
    

    According to Intel, this CPU should be: Total Cores: 12 (8 Performance-cores + 4 Efficient-cores) Total Threads: 20 (16 Performance-cores (HT) + 4 Efficient-cores (no HT))

    Files for this CPU: raw.txt report.txt

    Contact @mini-Dragon for more details.

    opened by TheTumultuousUnicornOfDarkness 21
  • L4 cache

    L4 cache

    I wonder if there's a way get this info. I've seen this info in txt form in some cpu-z reports. Core i7 processors.

    In the wiki there are some hints: "Intel Haswell CPUs with integrated Intel Iris Pro Graphics have 128 MB of eDRAM acting essentially as an L4 cache."

    It might a good idea to add 2 new members to the cpu_id_t struct: l4_cache l4_assoc

    This info is also easy to determine in modern cpus that use model numbers (brand_str)

    opened by wdlkmpx 18
  • Some new features for function cpu_msrinfo()

    Some new features for function cpu_msrinfo()

    Hi.

    I have found interesting things in i7z, and I have imported some lines in libcpuid. Tested with this code: https://gist.githubusercontent.com/X0rg/dd7ad35b670131e92274/raw/85ba68b8c12492c056cedf30e3180bce8877254e/msr.c It gives good results on my computer:

    Max multiplier: 33.00   Bclk: 99.87
    Core 0: 1.31V 34°C x38.23
    Core 1: 1.28V 36°C x38.61
    Core 2: 1.28V 42°C x38.04
    Core 3: 1.31V 39°C x38.81
    
    Core 0: 1.31V 33°C x39.20
    Core 1: 1.28V 33°C x38.86
    Core 2: 1.31V 38°C x37.89
    Core 3: 1.34V 39°C x38.39
    
    ...
    

    Max multiplier is the maximum NON-TURBO multiplier. The Core i5 2500K base frequency is 3300MHz (33x100MHz), but I have set the maximum turbo ratio to 42. So the current multiplier is a TURBO multiplier.

    Tell me what do you think about this. Thank.

    opened by TheTumultuousUnicornOfDarkness 18
  • Support for hybrid CPU

    Support for hybrid CPU

    Hello @anrieff,

    Good new: here are major changes to support hybrid CPUs like Intel Alder Lake! It is challenging to keep compatibility with existing tests and support new tests with multiples RAW and different CPU types, but I found a way to achieve that goal.

    I cleaned up my commits a bit on this branch (I do not guarantee individual commit build successfully due to rebase and cherry-picking, but current branch status is good).

    cpuid_tool output for Intel Core i912900K is looking like that:

    CPUID is present
    CPU Info for type #0:
    ------------------
      arch       : x86
      purpose    : performance
      vendor_str : `GenuineIntel'
      vendor id  : 0
      brand_str  : `12th Gen Intel(R) Core(TM) i9-12900K'
      family     : 6 (06h)
      model      : 7 (07h)
      stepping   : 2 (02h)
      ext_family : 6 (06h)
      ext_model  : 151 (97h)
      num_cores  : 8
      num_logical: 16
      tot_logical: 24
      affi_mask  : 0x0000FFFF
      L1 D cache : 48 KB
      L1 I cache : 32 KB
      L2 cache   : 1280 KB
      L3 cache   : 30720 KB
      L4 cache   : -1 KB
      L1D assoc. : 12-way
      L1I assoc. : 8-way
      L2 assoc.  : 10-way
      L3 assoc.  : 12-way
      L4 assoc.  : -1-way
      L1D line sz: 64 bytes
      L1I line sz: 64 bytes
      L2 line sz : 64 bytes
      L3 line sz : 64 bytes
      L4 line sz : -1 bytes
      SSE units  : 128 bits (non-authoritative)
      code name  : `Alder Lake-S (Core i9)'
      features   : fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 sha_ni rdseed adx
    CPU Info for type #1:
    ------------------
      arch       : x86
      purpose    : efficiency
      vendor_str : `GenuineIntel'
      vendor id  : 0
      brand_str  : `12th Gen Intel(R) Core(TM) i9-12900K'
      family     : 6 (06h)
      model      : 7 (07h)
      stepping   : 2 (02h)
      ext_family : 6 (06h)
      ext_model  : 151 (97h)
      num_cores  : 8
      num_logical: 8
      tot_logical: 24
      affi_mask  : 0x00FF0000
      L1 D cache : 32 KB
      L1 I cache : 64 KB
      L2 cache   : 2048 KB
      L3 cache   : 30720 KB
      L4 cache   : -1 KB
      L1D assoc. : 8-way
      L1I assoc. : 8-way
      L2 assoc.  : 16-way
      L3 assoc.  : 12-way
      L4 assoc.  : -1-way
      L1D line sz: 64 bytes
      L1I line sz: 64 bytes
      L2 line sz : 64 bytes
      L3 line sz : 64 bytes
      L4 line sz : -1 bytes
      SSE units  : 128 bits (non-authoritative)
      code name  : `Alder Lake-S (Core i9)'
      features   : fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 xd movbe popcnt aes xsave osxsave avx rdtscp lm lahf_lm abm constant_tsc fma3 f16c rdrand x2apic avx2 bmi1 bmi2 sha_ni rdseed adx
    

    We can clearly identify 8 performance cores with HT and 8 efficiency cores without HT. So 16 + 8 threads, total logical CPU count is 24.

    For non-hybrid CPUs, I decided to create a "general" purpose, because I do not think the concept of "performance" or "efficiency" makes sense for such case. Example for my AMD Ryzen 3600X:

    CPUID is present
    CPU Info for type #0:
    ------------------
      arch       : x86
      purpose    : general
      vendor_str : `AuthenticAMD'
      vendor id  : 1
      brand_str  : `AMD Ryzen 5 3600X 6-Core Processor             '
      family     : 15 (0Fh)
      model      : 1 (01h)
      stepping   : 0 (00h)
      ext_family : 23 (17h)
      ext_model  : 113 (71h)
      num_cores  : 6
      num_logical: 12
      tot_logical: 12
      affi_mask  : 0x00000FFF
      L1 D cache : 32 KB
      L1 I cache : 32 KB
      L2 cache   : 512 KB
      L3 cache   : 32768 KB
      L4 cache   : -1 KB
      L1D assoc. : 8-way
      L1I assoc. : 8-way
      L2 assoc.  : 8-way
      L3 assoc.  : 16-way
      L4 assoc.  : -1-way
      L1D line sz: 64 bytes
      L1I line sz: 64 bytes
      L2 line sz : 64 bytes
      L3 line sz : 64 bytes
      L4 line sz : -1 bytes
      SSE units  : 256 bits (authoritative)
      code name  : `Ryzen 5 (Matisse)'
      features   : fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht pni pclmul monitor ssse3 cx16 sse4_1 sse4_2 syscall movbe popcnt aes xsave osxsave avx mmxext nx fxsr_opt rdtscp lm lahf_lm cmp_legacy svm abm misalignsse sse4a 3dnowprefetch osvw ibs skinit wdt ts ttp tm_amd hwpstate constant_tsc fma3 f16c rdrand cpb aperfmperf avx2 bmi1 bmi2 sha_ni rdseed adx
    

    CPU type delimiters for cpuid_tool output and tests are arbitrary, feel free to propose something else.

    In 4f80964db5bab011c1893ad17adcaec20d6d7fae, I wrote the set_cpu_affinity() functions based on examples I found on the Internet. I tested this function on my Linux system but I did not test it on other OS (CI with macOS and Windows build fine, but it does not reflect the behavior of real life systems).

    Please let me know if you have time to review this PR. It introduces a backwards-incompatible change, so I think the next release will be 0.6.0.

    opened by TheTumultuousUnicornOfDarkness 15
  • Wrong CPU multipliers on AMD APU

    Wrong CPU multipliers on AMD APU

    As reported in X0rg/CPU-X#31, CPU multipliers are wrong with some AMD APUs. The minimum and maximum multipliers are wrong, and the bus clock is wrong too.

    Possible causes:

    • Wrong P-state read
    • Wrong formula for multiplier computation

    What is needed to fix it:

    • More tests

    There is a standalone source code on my Gist which can be used to help to debug. Build and run instructions are on the top of file. I'm looking for testers.

    opened by TheTumultuousUnicornOfDarkness 14
  • Add CMake support

    Add CMake support

    Add support for cmake build system. Why? Works on all platforms/architectures. No need to get stuck with ancient VS sln files Generates stuff for later consuming the output library in your projects (cpuidConfig.cmake stuff)

    Actually, I need libcpuid as vcpkg and it will be a lot easier to create vcpkg port if the build system is cmake, thats why :)

    opened by kreuzerkrieg 13
  • Misdiagnosis microarchitecture for i3-3220T

    Misdiagnosis microarchitecture for i3-3220T

    This is Ivy Bridge

    `version=0.4.0 basic_cpuid[0]=0000000d 756e6547 6c65746e 49656e69 basic_cpuid[1]=000306a9 03100800 3d9ae3bf bfebfbff basic_cpuid[2]=76035a01 00f0b2ff 00000000 00ca0000 basic_cpuid[3]=00000000 00000000 00000000 00000000 basic_cpuid[4]=1c004121 01c0003f 0000003f 00000000 basic_cpuid[5]=00000040 00000040 00000003 00001120 basic_cpuid[6]=00000075 00000002 00000009 00000000 basic_cpuid[7]=00000000 00000281 00000000 00000000 basic_cpuid[8]=00000000 00000000 00000000 00000000 basic_cpuid[9]=00000000 00000000 00000000 00000000 basic_cpuid[10]=07300403 00000000 00000000 00000603 basic_cpuid[11]=00000001 00000002 00000100 00000003 basic_cpuid[12]=00000000 00000000 00000000 00000000 basic_cpuid[13]=00000007 00000340 00000340 00000000 basic_cpuid[14]=00000007 00000340 00000340 00000000 basic_cpuid[15]=00000007 00000340 00000340 00000000 basic_cpuid[16]=00000007 00000340 00000340 00000000 basic_cpuid[17]=00000007 00000340 00000340 00000000 basic_cpuid[18]=00000007 00000340 00000340 00000000 basic_cpuid[19]=00000007 00000340 00000340 00000000 basic_cpuid[20]=00000007 00000340 00000340 00000000 basic_cpuid[21]=00000007 00000340 00000340 00000000 basic_cpuid[22]=00000007 00000340 00000340 00000000 basic_cpuid[23]=00000007 00000340 00000340 00000000 basic_cpuid[24]=00000007 00000340 00000340 00000000 basic_cpuid[25]=00000007 00000340 00000340 00000000 basic_cpuid[26]=00000007 00000340 00000340 00000000 basic_cpuid[27]=00000007 00000340 00000340 00000000 basic_cpuid[28]=00000007 00000340 00000340 00000000 basic_cpuid[29]=00000007 00000340 00000340 00000000 basic_cpuid[30]=00000007 00000340 00000340 00000000 basic_cpuid[31]=00000007 00000340 00000340 00000000 ext_cpuid[0]=80000008 00000000 00000000 00000000 ext_cpuid[1]=00000000 00000000 00000001 28100800 ext_cpuid[2]=20202020 49202020 6c65746e 20295228 ext_cpuid[3]=65726f43 294d5428 2d336920 30323233 ext_cpuid[4]=50432054 20402055 30382e32 007a4847 ext_cpuid[5]=00000000 00000000 00000000 00000000 ext_cpuid[6]=00000000 00000000 01006040 00000000 ext_cpuid[7]=00000000 00000000 00000000 00000100 ext_cpuid[8]=00003024 00000000 00000000 00000000 ext_cpuid[9]=00000007 00000340 00000340 00000000 ext_cpuid[10]=00000007 00000340 00000340 00000000 ext_cpuid[11]=00000007 00000340 00000340 00000000 ext_cpuid[12]=00000007 00000340 00000340 00000000 ext_cpuid[13]=00000007 00000340 00000340 00000000 ext_cpuid[14]=00000007 00000340 00000340 00000000 ext_cpuid[15]=00000007 00000340 00000340 00000000 ext_cpuid[16]=00000007 00000340 00000340 00000000 ext_cpuid[17]=00000007 00000340 00000340 00000000 ext_cpuid[18]=00000007 00000340 00000340 00000000 ext_cpuid[19]=00000007 00000340 00000340 00000000 ext_cpuid[20]=00000007 00000340 00000340 00000000 ext_cpuid[21]=00000007 00000340 00000340 00000000 ext_cpuid[22]=00000007 00000340 00000340 00000000 ext_cpuid[23]=00000007 00000340 00000340 00000000 ext_cpuid[24]=00000007 00000340 00000340 00000000 ext_cpuid[25]=00000007 00000340 00000340 00000000 ext_cpuid[26]=00000007 00000340 00000340 00000000 ext_cpuid[27]=00000007 00000340 00000340 00000000 ext_cpuid[28]=00000007 00000340 00000340 00000000 ext_cpuid[29]=00000007 00000340 00000340 00000000 ext_cpuid[30]=00000007 00000340 00000340 00000000 ext_cpuid[31]=00000007 00000340 00000340 00000000 intel_fn4[0]=1c004121 01c0003f 0000003f 00000000 intel_fn4[1]=1c004122 01c0003f 0000003f 00000000 intel_fn4[2]=1c004143 01c0003f 000001ff 00000000 intel_fn4[3]=1c03c163 02c0003f 00000fff 00000006 intel_fn4[4]=00000000 00000000 00000000 00000000 intel_fn4[5]=00000000 00000000 00000000 00000000 intel_fn4[6]=00000000 00000000 00000000 00000000 intel_fn4[7]=00000000 00000000 00000000 00000000 intel_fn11[0]=00000001 00000002 00000100 00000003 intel_fn11[1]=00000004 00000004 00000201 00000003 intel_fn11[2]=00000000 00000000 00000002 00000003 intel_fn11[3]=00000000 00000000 00000003 00000003 intel_fn12h[0]=00000007 00000340 00000340 00000000 intel_fn12h[1]=00000001 00000000 00000000 00000000 intel_fn12h[2]=00000100 00000240 00000000 00000000 intel_fn12h[3]=00000000 00000000 00000000 00000000 intel_fn14h[0]=00000007 00000340 00000340 00000000 intel_fn14h[1]=00000001 00000000 00000000 00000000 intel_fn14h[2]=00000100 00000240 00000000 00000000 intel_fn14h[3]=00000000 00000000 00000000 00000000 CPUID is present CPU Info:

    vendor_str : GenuineIntel' vendor id : 0 brand_str :Intel(R) Core(TM) i3-3220T CPU @ 2.80GHz' family : 6 (06h) model : 10 (0Ah) stepping : 9 (09h) ext_family : 6 (06h) ext_model : 58 (3Ah) num_cores : 2 num_logical: 4 tot_logical: 4 L1 D cache : 32 KB L1 I cache : 32 KB L2 cache : 256 KB L3 cache : 3072 KB L4 cache : -1 KB L1D assoc. : 8-way L2 assoc. : 8-way L3 assoc. : 12-way L4 assoc. : -1-way L1D line sz: 64 bytes L2 line sz : 64 bytes L3 line sz : 64 bytes L4 line sz : -1 bytes SSE units : 128 bits (non-authoritative) code name : Sandy Bridge (Core i3)' features : fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 syscall xd popcnt xsave osxsave avx rdtscp lm lahf_lm constant_tsc f16c

    opened by eloaders 13
  • /debian sub-directory and its brethen needs to be updated.

    /debian sub-directory and its brethen needs to be updated.

    Hi all,

    I did a clean clone -

     [~/games] - [10044]
    └─[$] git clone https://github.com/anrieff/libcpuid.git  
    
    Cloning into 'libcpuid'...
    remote: Counting objects: 1494, done.
    remote: Compressing objects: 100% (24/24), done.
    remote: Total 1494 (delta 10), reused 0 (delta 0), pack-reused 1470
    Receiving objects: 100% (1494/1494), 433.14 KiB | 122.00 KiB/s, done.
    Resolving deltas: 100% (1082/1082), done.
    Checking connectivity... done.
    
    

    Then went into the directory to check if it's synced to the latest git message

    [~/games/libcpuid] - [10063]
    └─[$] git log | less     
    
    commit c31b5c0ae84264082bff6b351b52ab7cc2f025e3
    Author: Veselin Georgiev <[email protected]>
    Date:   Fri Jun 3 04:35:01 2016 +0300
    
        Add up to 8 entries for CPUID leaf 04; push version to 0.3.0.
    
        This is a backwards-incompatible binary change, which increases
        sizeof(cpu_raw_data_t). Specifically, the cpu_raw_data_t::intel_fn4
        array is increased from 4 to 8 elements, because on recent Hasells
        (Crystalwell) there is a Level 4 cache, which should be encoded in
        CPUID eax=4 ecx=4. However, we were only storing levels for eax=4
        for ecx <= 3. Thus the raw data didn't have the relevant info.
    
        There will be further changes to this, specifically to store
        and print the level 4 cache in cpuid_tool.
    
    

    The above confirmed that I have the latest master.

    Then compiled it

    [~/games/libcpuid] - [10048]
    └─[$] fakeroot debian/rules binary   
    
    dh binary  --with autotools-dev
       dh_testdir
       dh_update_autotools_config
       dh_autotools-dev_updateconfig
       debian/rules override_dh_auto_configure
    make[1]: Entering directory '/home/shirish/games/libcpuid'
    libtoolize
    libtoolize: putting auxiliary files in '.'.
    libtoolize: linking file './ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
    libtoolize: linking file 'm4/libtool.m4'
    libtoolize: linking file 'm4/ltoptions.m4'
    libtoolize: linking file 'm4/ltsugar.m4'
    libtoolize: linking file 'm4/ltversion.m4'
    libtoolize: linking file 'm4/lt~obsolete.m4'
    autoreconf --install
    configure.ac:35: installing './ar-lib'
    configure.ac:34: installing './compile'
    configure.ac:37: installing './config.guess'
    configure.ac:37: installing './config.sub'
    configure.ac:5: installing './install-sh'
    configure.ac:5: installing './missing'
    cpuid_tool/Makefile.am: installing './depcomp'
    dh_auto_configure
        ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/x86_64-linux-gnu --libexecdir=\${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking
    configure: WARNING: unrecognized options: --disable-maintainer-mode
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of gcc... none
    checking for ar... ar
    checking the archiver (ar) interface... ar
    checking for an ANSI C-conforming const... yes
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for mt... mt
    checking if mt is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking for stdint.h... (cached) yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libcpuid.pc
    config.status: creating libcpuid/Makefile
    config.status: creating cpuid_tool/Makefile
    config.status: creating tests/Makefile
    config.status: creating libcpuid/Doxyfile
    config.status: creating config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    configure: WARNING: unrecognized options: --disable-maintainer-mode
    make[1]: Leaving directory '/home/shirish/games/libcpuid'
       dh_auto_build
        make -j1
    make[1]: Entering directory '/home/shirish/games/libcpuid'
    make  all-recursive
    make[2]: Entering directory '/home/shirish/games/libcpuid'
    Making all in libcpuid
    make[3]: Entering directory '/home/shirish/games/libcpuid/libcpuid'
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o cpuid_main.lo cpuid_main.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c cpuid_main.c  -fPIC -DPIC -o .libs/cpuid_main.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c cpuid_main.c -o cpuid_main.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o recog_intel.lo recog_intel.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c recog_intel.c  -fPIC -DPIC -o .libs/recog_intel.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c recog_intel.c -o recog_intel.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o recog_amd.lo recog_amd.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c recog_amd.c  -fPIC -DPIC -o .libs/recog_amd.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c recog_amd.c -o recog_amd.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o rdtsc.lo rdtsc.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c rdtsc.c  -fPIC -DPIC -o .libs/rdtsc.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c rdtsc.c -o rdtsc.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o asm-bits.lo asm-bits.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c asm-bits.c  -fPIC -DPIC -o .libs/asm-bits.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c asm-bits.c -o asm-bits.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o libcpuid_util.lo libcpuid_util.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c libcpuid_util.c  -fPIC -DPIC -o .libs/libcpuid_util.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c libcpuid_util.c -o libcpuid_util.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o rdmsr.lo rdmsr.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c rdmsr.c  -fPIC -DPIC -o .libs/rdmsr.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c rdmsr.c -o rdmsr.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o msrdriver.lo msrdriver.c
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c msrdriver.c  -fPIC -DPIC -o .libs/msrdriver.o
    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -Wmissing-declarations -Wmissing-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c msrdriver.c -o msrdriver.o >/dev/null 2>&1
    /bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -export-symbols ./libcpuid.sym -no-undefined -version-info 13:0:2 -Wl,-z,relro -o libcpuid.la -rpath /usr/lib/x86_64-linux-gnu cpuid_main.lo recog_intel.lo recog_amd.lo rdtsc.lo asm-bits.lo libcpuid_util.lo rdmsr.lo msrdriver.lo  
    libtool: link: echo "{ global:" > .libs/libcpuid.ver
    libtool: link:  cat ./libcpuid.sym | sed -e "s/\(.*\)/\1;/" >> .libs/libcpuid.ver
    libtool: link:  echo "local: *; };" >> .libs/libcpuid.ver
    libtool: link:  gcc -shared  -fPIC -DPIC  .libs/cpuid_main.o .libs/recog_intel.o .libs/recog_amd.o .libs/rdtsc.o .libs/asm-bits.o .libs/libcpuid_util.o .libs/rdmsr.o .libs/msrdriver.o    -g -O2 -fstack-protector-strong -Wl,-z -Wl,relro   -Wl,-soname -Wl,libcpuid.so.11 -Wl,-version-script -Wl,.libs/libcpuid.ver -o .libs/libcpuid.so.11.2.0
    libtool: link: (cd ".libs" && rm -f "libcpuid.so.11" && ln -s "libcpuid.so.11.2.0" "libcpuid.so.11")
    libtool: link: (cd ".libs" && rm -f "libcpuid.so" && ln -s "libcpuid.so.11.2.0" "libcpuid.so")
    libtool: link: ar cru .libs/libcpuid.a  cpuid_main.o recog_intel.o recog_amd.o rdtsc.o asm-bits.o libcpuid_util.o rdmsr.o msrdriver.o
    ar: `u' modifier ignored since `D' is the default (see `U')
    libtool: link: ranlib .libs/libcpuid.a
    libtool: link: ( cd ".libs" && rm -f "libcpuid.la" && ln -s "../libcpuid.la" "libcpuid.la" )
    make[3]: Leaving directory '/home/shirish/games/libcpuid/libcpuid'
    Making all in cpuid_tool
    make[3]: Entering directory '/home/shirish/games/libcpuid/cpuid_tool'
    gcc -DHAVE_CONFIG_H -I. -I..   -I../libcpuid -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o cpuid_tool.o cpuid_tool.c
    /bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -g -Wall -Wl,-z,relro -o cpuid_tool cpuid_tool.o ../libcpuid/libcpuid.la 
    libtool: link: gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z -Wl,relro -g -Wall -Wl,-z -Wl,relro -o .libs/cpuid_tool cpuid_tool.o  ../libcpuid/.libs/libcpuid.so
    make[3]: Leaving directory '/home/shirish/games/libcpuid/cpuid_tool'
    Making all in tests
    make[3]: Entering directory '/home/shirish/games/libcpuid/tests'
    make[3]: Nothing to be done for 'all'.
    make[3]: Leaving directory '/home/shirish/games/libcpuid/tests'
    make[3]: Entering directory '/home/shirish/games/libcpuid'
    make[3]: Leaving directory '/home/shirish/games/libcpuid'
    make[2]: Leaving directory '/home/shirish/games/libcpuid'
    make[1]: Leaving directory '/home/shirish/games/libcpuid'
       dh_auto_test
        make -j1 test VERBOSE=1
    make[1]: Entering directory '/home/shirish/games/libcpuid'
    LD_PRELOAD=./libcpuid/.libs/libcpuid.so ./tests/run_tests.py ./cpuid_tool/.libs/cpuid_tool --show-test-fast-warning ./tests
    Testing...
    Test [./tests/amd/bulldozer/vishera-x4]: OK
    Test [./tests/amd/bulldozer/bulldozer-x4]: OK
    Test [./tests/amd/k8/turion-64-lancaster]: OK
    Test [./tests/amd/k8/sempron-64-sparta]: OK
    Test [./tests/amd/k8/opteron-denmark]: OK
    Test [./tests/amd/k8/athlon-64-venice]: OK
    Test [./tests/amd/k8/mobile-sempron-64-keene]: OK
    Test [./tests/amd/k8/mobile-sempron-64-sonora]: OK
    Test [./tests/amd/k8/athlon-64-brisbane]: OK
    Test [./tests/amd/bobcat/brazos-zacate]: OK
    Test [./tests/amd/k7/sempron-barton]: OK
    Test [./tests/amd/k7/athlon-thoroughbred]: OK
    Test [./tests/amd/k7/duron-applebred]: OK
    Test [./tests/amd/k10/athlon-2-champlain-mobile]: OK
    Test [./tests/amd/k10/athlon-2-propus]: OK
    Test [./tests/amd/k10/athlon-2-kuma]: OK
    Test [./tests/amd/k10/sempron-sargas]: OK
    Test [./tests/amd/k10/phenom-2-deneb]: OK
    Test [./tests/amd/k10/phenom-2-thuban]: OK
    Test [./tests/amd/k10/athlon-2-propus-3]: OK
    Test [./tests/amd/k10/phenom-agena]: OK
    Test [./tests/amd/k10/magny-cours]: OK
    Test [./tests/amd/k10/athlon-2-regor]: OK
    Test [./tests/amd/k10/phenom-2-heka]: OK
    Test [./tests/amd/k10/athlon-2-propus-2]: OK
    Test [./tests/intel/p2/pentium-dixon]: OK
    Test [./tests/intel/p2/pentium-coppermine]: OK
    Test [./tests/intel/p2/petium-m-dothan]: OK
    Test [./tests/intel/skylake/skylake-i5]: OK
    Test [./tests/intel/atom/atom-diamondville-dualcore]: OK
    Test [./tests/intel/atom/atom-diamondville]: OK
    Test [./tests/intel/atom/atom-pineview-2]: OK
    Test [./tests/intel/atom/atom-pineview]: OK
    Test [./tests/intel/sandy/sandy-bridge-i7]: OK
    Test [./tests/intel/sandy/xeon-sandy]: OK
    Test [./tests/intel/sandy/celeron-sandy]: OK
    Test [./tests/intel/sandy/sandy-bridge-e-i7]: OK
    Test [./tests/intel/sandy/ivy-bridge-i5]: OK
    Test [./tests/intel/core2/penryn-mobile]: OK
    Test [./tests/intel/core2/yonah-3]: OK
    Test [./tests/intel/core2/conroe-1m]: OK
    Test [./tests/intel/core2/merom]: OK
    Test [./tests/intel/core2/penryn-3m]: OK
    Test [./tests/intel/core2/yonah]: OK
    Test [./tests/intel/core2/xeon-wolfdale]: OK
    Test [./tests/intel/core2/kentsfield]: OK
    Test [./tests/intel/core2/yorkfield-2m]: OK
    Test [./tests/intel/core2/conroe]: OK
    Test [./tests/intel/core2/xeon-clovertown]: OK
    Test [./tests/intel/core2/xeon-harpertown]: OK
    Test [./tests/intel/core2/wolfdale]: OK
    Test [./tests/intel/core2/yorkfield]: OK
    Test [./tests/intel/core2/yonah-2]: OK
    Test [./tests/intel/core2/allendale]: OK
    Test [./tests/intel/core2/merom-2m]: OK
    Test [./tests/intel/core2/conroe-l-celeron]: OK
    Test [./tests/intel/core2/celeron-wolfdale]: OK
    Test [./tests/intel/core2/conroe-l]: OK
    Test [./tests/intel/netburst/xeon-prestonia]: OK
    Test [./tests/intel/netburst/mobile-p4-northwood]: OK
    Test [./tests/intel/netburst/celeron-prescott]: OK
    Test [./tests/intel/netburst/celeron-northwood.test]: OK
    Test [./tests/intel/netburst/p4-prescott-ht]: OK
    Test [./tests/intel/netburst/p4-northwood]: OK
    Test [./tests/intel/netburst/celeron-willamette]: OK
    Test [./tests/intel/nehalem/lynnfield-i7]: OK
    Test [./tests/intel/nehalem/bloomfield]: OK
    Test [./tests/intel/nehalem/arrandale-i7]: OK
    Test [./tests/intel/nehalem/xeon-gulftown]: OK
    Test [./tests/intel/nehalem/arrandale-mobile]: OK
    Test [./tests/intel/nehalem/xeon-bloomfield]: OK
    Test [./tests/intel/nehalem/xeon-gainestown]: OK
    Test [./tests/intel/nehalem/gulftown-i7]: OK
    Test [./tests/intel/nehalem/arrandale-i5]: OK
    Test [./tests/intel/haswell/haswell-i7]: OK
    Test [./tests/intel/haswell/haswell-i3]: OK
    Test [./tests/intel/haswell/haswell-i5]: OK
    All successfull!
    make[1]: Leaving directory '/home/shirish/games/libcpuid'
       dh_testroot
       dh_prep
       dh_auto_install
        make -j1 install DESTDIR=/home/shirish/games/libcpuid/debian/tmp AM_UPDATE_INFO_DIR=no
    make[1]: Entering directory '/home/shirish/games/libcpuid'
    Making install in libcpuid
    make[2]: Entering directory '/home/shirish/games/libcpuid/libcpuid'
    make[3]: Entering directory '/home/shirish/games/libcpuid/libcpuid'
     /bin/mkdir -p '/home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu'
     /bin/bash ../libtool   --mode=install /usr/bin/install -c   libcpuid.la '/home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu'
    libtool: install: /usr/bin/install -c .libs/libcpuid.so.11.2.0 /home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu/libcpuid.so.11.2.0
    libtool: install: (cd /home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu && { ln -s -f libcpuid.so.11.2.0 libcpuid.so.11 || { rm -f libcpuid.so.11 && ln -s libcpuid.so.11.2.0 libcpuid.so.11; }; })
    libtool: install: (cd /home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu && { ln -s -f libcpuid.so.11.2.0 libcpuid.so || { rm -f libcpuid.so && ln -s libcpuid.so.11.2.0 libcpuid.so; }; })
    libtool: install: /usr/bin/install -c .libs/libcpuid.lai /home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu/libcpuid.la
    libtool: install: /usr/bin/install -c .libs/libcpuid.a /home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu/libcpuid.a
    libtool: install: chmod 644 /home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu/libcpuid.a
    libtool: install: ranlib /home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu/libcpuid.a
    libtool: warning: remember to run 'libtool --finish /usr/lib/x86_64-linux-gnu'
     /bin/mkdir -p '/home/shirish/games/libcpuid/debian/tmp/usr/include/libcpuid'
     /usr/bin/install -c -m 644 libcpuid.h libcpuid_constants.h libcpuid_types.h '/home/shirish/games/libcpuid/debian/tmp/usr/include/libcpuid'
    make[3]: Leaving directory '/home/shirish/games/libcpuid/libcpuid'
    make[2]: Leaving directory '/home/shirish/games/libcpuid/libcpuid'
    Making install in cpuid_tool
    make[2]: Entering directory '/home/shirish/games/libcpuid/cpuid_tool'
    make[3]: Entering directory '/home/shirish/games/libcpuid/cpuid_tool'
     /bin/mkdir -p '/home/shirish/games/libcpuid/debian/tmp/usr/bin'
      /bin/bash ../libtool   --mode=install /usr/bin/install -c cpuid_tool '/home/shirish/games/libcpuid/debian/tmp/usr/bin'
    libtool: install: /usr/bin/install -c .libs/cpuid_tool /home/shirish/games/libcpuid/debian/tmp/usr/bin/cpuid_tool
    make[3]: Nothing to be done for 'install-data-am'.
    make[3]: Leaving directory '/home/shirish/games/libcpuid/cpuid_tool'
    make[2]: Leaving directory '/home/shirish/games/libcpuid/cpuid_tool'
    Making install in tests
    make[2]: Entering directory '/home/shirish/games/libcpuid/tests'
    make[3]: Entering directory '/home/shirish/games/libcpuid/tests'
    make[3]: Nothing to be done for 'install-exec-am'.
    make[3]: Nothing to be done for 'install-data-am'.
    make[3]: Leaving directory '/home/shirish/games/libcpuid/tests'
    make[2]: Leaving directory '/home/shirish/games/libcpuid/tests'
    make[2]: Entering directory '/home/shirish/games/libcpuid'
    make[3]: Entering directory '/home/shirish/games/libcpuid'
    make[3]: Nothing to be done for 'install-exec-am'.
     /bin/mkdir -p '/home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu/pkgconfig'
     /usr/bin/install -c -m 644 libcpuid.pc '/home/shirish/games/libcpuid/debian/tmp/usr/lib/x86_64-linux-gnu/pkgconfig'
    make[3]: Leaving directory '/home/shirish/games/libcpuid'
    make[2]: Leaving directory '/home/shirish/games/libcpuid'
    make[1]: Leaving directory '/home/shirish/games/libcpuid'
       dh_install
       dh_installdocs
       dh_installchangelogs
       dh_perl
       dh_link
       dh_strip_nondeterminism
       dh_compress
       dh_fixperms
       dh_strip
       dh_makeshlibs
       dh_shlibdeps
       dh_installdeb
       dh_gencontrol
       dh_md5sums
       dh_builddeb
    dpkg-deb: building package 'libcpuid11-dbgsym' in '../libcpuid11-dbgsym_0.21_amd64.deb'.
    dpkg-deb: building package 'libcpuid11' in '../libcpuid11_0.21_amd64.deb'.
    dpkg-deb: building package 'libcpuid11-dev' in '../libcpuid11-dev_0.21_amd64.deb'.
    
    
    

    Here itself I felt something was wrong as the compilation resulted in libcpuid11_0.21_amd64.deb, had thought that the version numbering would change - comments please.

    Then installed it -

    [$] sudo dpkg -i libcpuid11_0.21_amd64.deb   
    
    [sudo] password for shirish: 
    D000001: ensure_diversions: new, (re)loading
    D000001: ensure_statoverrides: new, (re)loading
    (Reading database ... 923407 files and directories currently installed.)
    Preparing to unpack libcpuid11_0.21_amd64.deb ...
    D000001: process_archive oldversionstatus=installed
    Unpacking libcpuid11 (0.21) over (0.21) ...
    D000001: ensure_diversions: same, skipping
    D000001: process_archive updating info directory
    D000001: generating infodb hashfile
    D000001: process queue pkg libcpuid11:amd64 queue.len 0 progress 1, try 1
    Setting up libcpuid11 (0.21) ...
    D000001: deferred_configure updating conffiles
    Processing triggers for libc-bin (2.22-9) ...
    D000001: ensure_diversions: same, skipping
    D000001: cmpversions a='0:2016.03.30' b='0:2016.05.24' r=-2
    D000001: cmpversions a='0:1.18.7' b='0:1.16' r=2
    D000001: cmpversions a='0:1.18.7' b='0:1.16' r=2
    D000001: cmpversions a='0:1.18.7' b='0:1.16' r=2
    
    

    I have put aptitude in verbose mode hence you are seeing the above messages.

    I then went to /usr/share/doc/libcpuid11/ to see if changelog.gz had the new entries -

    $[/usr/share/doc/libcpuid11] - [10069]
    └─[$] zcat changelog.gz | less 
    
    libcpuid (0.21) unstable; urgency=low
    
      * Initial release add debian directory for libcpuid.
    
     -- Zhang, Guodong <[email protected]>  Fri, 10 Apr 2015 14:59:27 +0800
    (END)
    
    

    And guess what, seems that the debian-directory hasn't been updated since then :(

    opened by shirishag75 13
  • [Proposal] Enable CI/CD

    [Proposal] Enable CI/CD

    Hello,

    I propose to enable continuous integration and continuous deployment for libcpuid. Travis CI seems to be a good choice for this project: it offers support for Linux, macOS and Windows.

    What are the advantages CI/CD?

    • automatically build libcpuid for each operating system
    • automatically run tests
    • automatically deploy assets when a new release is tagged All of this in about 2 minutes on Travis servers.

    I have set an example of configuration file in my repository: https://github.com/X0rg/libcpuid/blob/travis/.travis.yml And the associated build on Travis CI: https://travis-ci.com/X0rg/libcpuid/builds/104303831 For this one, I have added a new tag (v0.4.2), and assets are available on GitHub: https://github.com/X0rg/libcpuid/releases/tag/v0.4.2

    What should be done? In brief, install Travis CI app for this repository and create a GitHub OAuth token to allow Travis CI to deploy assets on GitHub.

    But I'm confronted to an issue with Windows build: libcpuid_vc71.sln and libcpuid_vc10.sln are for older versions of Visual Studio, and Travis CI doesn't support them. To go further, I propose to set up a cross-platform build tool, like CMake. The main advantage is CMake is preinstalled in all operating system on Travis CI, so libcpuid can be build without installing any dependency. CMake will not replace autotools nor Visual Studio project files.

    What do you think about it? Is it worth it and do you agree with that?

    opened by TheTumultuousUnicornOfDarkness 12
  • Build failes with MSVC

    Build failes with MSVC

    MSVC 2010 compiler gives following error messages (when we try to build libcpuid_vc10->libcpuid):

    1>rdmsr.c(636): error C2143: syntax error : missing ';' before 'const' 1>rdmsr.c(636): error C2143: syntax error : missing ';' before 'type' 1>rdmsr.c(636): error C2065: 'divisor_t' : undeclared identifier 1>rdmsr.c(636): error C2059: syntax error : ']' 1>rdmsr.c(649): error C2065: 'divisor_t' : undeclared identifier 1>rdmsr.c(649): error C2109: subscript requires array or pointer type 1>rdmsr.c(651): error C2065: 'divisor_t' : undeclared identifier 1>rdmsr.c(651): error C2109: subscript requires array or pointer type 1>rdmsr.c(652): error C2065: 'divisor_t' : undeclared identifier 1>rdmsr.c(652): error C2109: subscript requires array or pointer type 1>rdmsr.c(655): error C2043: illegal break 1>rdmsr.c(656): error C2046: illegal case 1>rdmsr.c(666): error C2043: illegal break 1>rdmsr.c(667): error C2046: illegal case 1>rdmsr.c(673): error C2046: illegal case 1>rdmsr.c(680): error C2046: illegal case 1>rdmsr.c(685): error C2046: illegal case 1>rdmsr.c(693): error C2043: illegal break 1>rdmsr.c(694): error C2047: illegal default 1>rdmsr.c(696): error C2043: illegal break 1>rdmsr.c(699): error C2059: syntax error : 'return' 1>rdmsr.c(700): error C2059: syntax error : '}' 1>rdmsr.c(746): warning C4013: 'get_amd_last_pstate_addr' undefined; assuming extern returning int 1>rdmsr.c(899): warning C4244: 'function' : conversion from 'uint64_t' to 'uint32_t', possible loss of data 1> rdtsc.c 1> recog_amd.c 1>recog_amd.c(476): error C2143: syntax error : missing ';' before 'type' 1>recog_amd.c(477): error C2065: 'result' : undeclared identifier 1>recog_amd.c(477): error C2440: 'return' : cannot convert from 'int' to 'amd_code_and_bits_t' 1>recog_amd.c(520): error C2143: syntax error : missing ';' before 'type' 1>recog_amd.c(525): error C2065: 'model_code' : undeclared identifier 1> recog_intel.c 1>recog_intel.c(756): error C2275: 'intel_code_and_bits_t' : illegal use of this type as an expression 1> recog_intel.c(43) : see declaration of 'intel_code_and_bits_t' 1>recog_intel.c(756): error C2146: syntax error : missing ';' before identifier 'result' 1>recog_intel.c(756): error C2065: 'result' : undeclared identifier 1>recog_intel.c(756): error C2059: syntax error : '{' 1>recog_intel.c(757): error C2065: 'result' : undeclared identifier 1>recog_intel.c(757): error C2440: 'return' : cannot convert from 'int' to 'intel_code_and_bits_t' 1>recog_intel.c(911): warning C4244: 'function' : conversion from 'uint64_t' to 'int', possible loss of data 1> 1>Build FAILED.

    opened by advanpix 12
  • conda-forge package

    conda-forge package

    Many thanks for this excellent package. We make use of libcpuid within our package Sire, a multiscale molecular-simulation framework. We are currently in the process of porting our build to the conda-forge ecosystem and are running into issues since we currently vendor your package. (We bundle a copy of libcpuid that is compiled during our build, along with an appropriate attribution and thirdparty license file.)

    Would you be willing to create and maintain a conda-forge package for libcpuid? This would remove the undesirable vendoring issue, and allow us to directly list libcpuid as a host requirement for the conda build process. (The package would then be pulled from conda-forge.)

    Since your package is self-contained and easy to build, I don't think this would be too much work. Although I could create a package myself, I think it's better if it comes from the original developers since they are better aware of build issues on different platforms and maintenance is generally easier. That said, I'd be happy to help if you have questions or issues.

    Here is a link to the the conda-forge staged recipes repository, which describes how to write and submit a build recipe. Our pull-request to this repository can be found here.

    Cheers.

    opened by lohedges 5
  • Detection of processor BUGS

    Detection of processor BUGS

    Would it be possible to add detection options to the library:

    cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit

    raw.txt

    basic_cpuid[0]=0000000d 756e6547 6c65746e 49656e69
    basic_cpuid[1]=000306a9 01100800 7fbae3bf bfebfbff
    basic_cpuid[2]=76035a01 00f0b2ff 00000000 00ca0000
    basic_cpuid[3]=00000000 00000000 00000000 00000000
    basic_cpuid[4]=1c004121 01c0003f 0000003f 00000000
    basic_cpuid[5]=00000040 00000040 00000003 00021120
    basic_cpuid[6]=00000077 00000002 00000009 00000000
    basic_cpuid[7]=00000000 00000281 00000000 9c000400
    basic_cpuid[8]=00000000 00000000 00000000 00000000
    basic_cpuid[9]=00000000 00000000 00000000 00000000
    basic_cpuid[10]=07300403 00000000 00000000 00000603
    basic_cpuid[11]=00000001 00000002 00000100 00000001
    basic_cpuid[12]=00000000 00000000 00000000 00000000
    basic_cpuid[13]=00000007 00000340 00000340 00000000
    basic_cpuid[14]=00000007 00000340 00000340 00000000
    basic_cpuid[15]=00000007 00000340 00000340 00000000
    basic_cpuid[16]=00000007 00000340 00000340 00000000
    basic_cpuid[17]=00000007 00000340 00000340 00000000
    basic_cpuid[18]=00000007 00000340 00000340 00000000
    basic_cpuid[19]=00000007 00000340 00000340 00000000
    basic_cpuid[20]=00000007 00000340 00000340 00000000
    basic_cpuid[21]=00000007 00000340 00000340 00000000
    basic_cpuid[22]=00000007 00000340 00000340 00000000
    basic_cpuid[23]=00000007 00000340 00000340 00000000
    basic_cpuid[24]=00000007 00000340 00000340 00000000
    basic_cpuid[25]=00000007 00000340 00000340 00000000
    basic_cpuid[26]=00000007 00000340 00000340 00000000
    basic_cpuid[27]=00000007 00000340 00000340 00000000
    basic_cpuid[28]=00000007 00000340 00000340 00000000
    basic_cpuid[29]=00000007 00000340 00000340 00000000
    basic_cpuid[30]=00000007 00000340 00000340 00000000
    basic_cpuid[31]=00000007 00000340 00000340 00000000
    ext_cpuid[0]=80000008 00000000 00000000 00000000
    ext_cpuid[1]=00000000 00000000 00000001 28100800
    ext_cpuid[2]=20202020 49202020 6c65746e 20295228
    ext_cpuid[3]=65726f43 294d5428 2d356920 30333233
    ext_cpuid[4]=5043204d 20402055 30362e32 007a4847
    ext_cpuid[5]=00000000 00000000 00000000 00000000
    ext_cpuid[6]=00000000 00000000 01006040 00000000
    ext_cpuid[7]=00000000 00000000 00000000 00000100
    ext_cpuid[8]=00003024 00000000 00000000 00000000
    ext_cpuid[9]=00000007 00000340 00000340 00000000
    ext_cpuid[10]=00000007 00000340 00000340 00000000
    ext_cpuid[11]=00000007 00000340 00000340 00000000
    ext_cpuid[12]=00000007 00000340 00000340 00000000
    ext_cpuid[13]=00000007 00000340 00000340 00000000
    ext_cpuid[14]=00000007 00000340 00000340 00000000
    ext_cpuid[15]=00000007 00000340 00000340 00000000
    ext_cpuid[16]=00000007 00000340 00000340 00000000
    ext_cpuid[17]=00000007 00000340 00000340 00000000
    ext_cpuid[18]=00000007 00000340 00000340 00000000
    ext_cpuid[19]=00000007 00000340 00000340 00000000
    ext_cpuid[20]=00000007 00000340 00000340 00000000
    ext_cpuid[21]=00000007 00000340 00000340 00000000
    ext_cpuid[22]=00000007 00000340 00000340 00000000
    ext_cpuid[23]=00000007 00000340 00000340 00000000
    ext_cpuid[24]=00000007 00000340 00000340 00000000
    ext_cpuid[25]=00000007 00000340 00000340 00000000
    ext_cpuid[26]=00000007 00000340 00000340 00000000
    ext_cpuid[27]=00000007 00000340 00000340 00000000
    ext_cpuid[28]=00000007 00000340 00000340 00000000
    ext_cpuid[29]=00000007 00000340 00000340 00000000
    ext_cpuid[30]=00000007 00000340 00000340 00000000
    ext_cpuid[31]=00000007 00000340 00000340 00000000
    intel_fn4[0]=1c004121 01c0003f 0000003f 00000000
    intel_fn4[1]=1c004122 01c0003f 0000003f 00000000
    intel_fn4[2]=1c004143 01c0003f 000001ff 00000000
    intel_fn4[3]=1c03c163 02c0003f 00000fff 00000006
    intel_fn4[4]=00000000 00000000 00000000 00000000
    intel_fn4[5]=00000000 00000000 00000000 00000000
    intel_fn4[6]=00000000 00000000 00000000 00000000
    intel_fn4[7]=00000000 00000000 00000000 00000000
    intel_fn11[0]=00000001 00000002 00000100 00000001
    intel_fn11[1]=00000004 00000004 00000201 00000001
    intel_fn11[2]=00000000 00000000 00000002 00000001
    intel_fn11[3]=00000000 00000000 00000003 00000001
    intel_fn12h[0]=00000007 00000340 00000340 00000000
    intel_fn12h[1]=00000001 00000000 00000000 00000000
    intel_fn12h[2]=00000100 00000240 00000000 00000000
    intel_fn12h[3]=00000000 00000000 00000000 00000000
    intel_fn14h[0]=00000007 00000340 00000340 00000000
    intel_fn14h[1]=00000001 00000000 00000000 00000000
    intel_fn14h[2]=00000100 00000240 00000000 00000000
    intel_fn14h[3]=00000000 00000000 00000000 00000000```
    
    report.txt
    `CPUID is present
    CPU Info:
    ------------------
      vendor_str : `GenuineIntel'
      vendor id  : 0
      brand_str  : `Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz'
      family     : 6 (06h)
      model      : 10 (0Ah)
      stepping   : 9 (09h)
      ext_family : 6 (06h)
      ext_model  : 58 (3Ah)
      num_cores  : 2
      num_logical: 4
      tot_logical: 4
      L1 D cache : 32 KB
      L1 I cache : 32 KB
      L2 cache   : 256 KB
      L3 cache   : 3072 KB
      L4 cache   : -1 KB
      L1D assoc. : 8-way
      L2 assoc.  : 8-way
      L3 assoc.  : 12-way
      L4 assoc.  : -1-way
      L1D line sz: 64 bytes
      L2 line sz : 64 bytes
      L3 line sz : 64 bytes
      L4 line sz : -1 bytes
      SSE units  : 128 bits (non-authoritative)
      code name  : `Ivy Bridge (Core i5)'
      features   : fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 syscall xd popcnt aes xsave osxsave avx rdtscp lm lahf_lm constant_tsc f16c rdrand x2apic`
    opened by eloaders 4
  • Support TSC frequency from cpuid

    Support TSC frequency from cpuid

    There is no interface to return it. For new chips its:

    Nominal TSC frequency = ( CPUID.15H.ECX[31:0] * CPUID.15H.EBX[31:0] ) ÷ CPUID.15H.EAX[31:0]
    

    See Intel® 64 and IA-32 Architectures Software Developers Manual Volume 3 (3A, 3B, 3C & 3D): Chapter 18.7.3 Determining the Processor Base Frequency

    There may be a fallback for old chips to calculate / measure it since we cannot access MSR. Of course this value only makes sense if TSC is invariant.

    (Maybe i am wrong, but i did not find it in source code)

    opened by KUGA2 2
Releases(v0.6.2)
Owner
Veselin Georgiev
Veselin Georgiev
A C library for runtime-flippable feature flags on Linux/x86-64, with negligible overhead in the common case

Biased runtime-flippable flags, with cross-modifying code The dynamic_flag library is a two-file "C" library that offers efficient biased conditionals

Backtrace Labs 60 Nov 9, 2022
Simple, fully external, smart, fast, JSON-configurated, feature-rich Windows x86 DLL Memory Dumper with Code Generation. Written in Modern C++.

altdumper Simple, fully external, smart, fast, JSON-configurated, feature-rich Windows x86 DLL Memory Dumper with Code Generation. Written in Modern C

cristei 14 Sep 9, 2022
A small single-file library for sprite outline extraction and simplification for C/C++

Sproutline A small single-file library for sprite outline extraction and simplification for C/C++. Input: Sprite with an alpha channel. Output: All th

ands 78 Aug 26, 2022
A port of the Linux x86 IOLI crackme challenges to x86-64

This is a port of the original Linux x86 IOLI crackme binaries to x86-64. The original set of IOLI crackmes can be found here: https://github.com/Maij

Julian Daeumer 4 Mar 19, 2022
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)

Unicorn Engine Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU. Unicorn offers some unparalleled fea

Unicorn Engine 5.9k Nov 22, 2022
Command line C++ and Python VSTi Host library with MFCC, FFT, RMS and audio extraction and .wav writing.

______ _ ___ ___ | ___ \ | | | \/ | | |_/ /___ _ __ __| | ___ _ __| . . | __ _ _ __

Leon Fedden 294 Nov 16, 2022
MDE is a model extraction tool that converts Destiny 2 dynamic models into fbx files supporting textures, skeletons, and all provided vertex data.

MDE is a model extraction tool that converts Destiny 2 dynamic models into fbx files. A dynamic model is one that is animated or is spawned in during the game.

Montague 33 Sep 2, 2022
A Semi Automatic Chessboard Corner Extraction Class

This program realizes semi-automatic chessboard corner extraction, the interface is simple, and the accuracy of corner extraction is guaranteed.

null 1 Oct 6, 2021
DLL Exports Extraction BOF with optional NTFS transactions.

DLL Exports Extraction BOF What is this? This is a Cobalt Strike BOF file, meant to use two or three arguments (path to DLL, and/or a third argument [

null 56 Nov 9, 2022
Tools for working with Wwise file types (only extraction at the moment)

Wwise Audio Tools This repository is for a static and dynamic library as well as a simple command line tool used to convert Wwise WEM files to OGG fil

RED Modding tools 7 Oct 10, 2022
C++11 header-only library that offers small vector, small flat map/set/multimap/multiset.

sfl library This is header-only C++11 library that offers several new containers: small_vector small_flat_set small_flat_map small_flat_multiset small

null 20 Nov 15, 2022
SafetyHook - simple procedure hooking library for Windows x86 and x86_64 systems

SafetyHook SafetyHook is simple procedure hooking library for Windows x86 and x86_64 systems. It aims to make runtime procedure hooking as safe as pos

null 30 Nov 21, 2022
A FREE Windows C development course where we will learn the Win32API and reverse engineer each step utilizing IDA Free in both an x86 and x64 environment.

FREE Reverse Engineering Self-Study Course HERE Hacking Windows The book and code repo for the FREE Hacking Windows book by Kevin Thomas. FREE Book Do

Kevin Thomas 1.1k Nov 19, 2022
Makes sure Shadowplay's Instant Replay feature is on.

AlwaysShadow Shadowplay's Instant Replay feature is unreliable. You often find out it is turned off when you need it most. This is despite the fact th

Aviv Edery 48 Nov 4, 2022
Set of examples how to use CLion with various unsupported compilers using Custom Defined Compiler feature

About This repository contains: Set of examples how to use CLion with various unsupported compilers using Custom Defined Compiler feature Public set o

JetBrains 37 Sep 30, 2022
Feature-limited C64 music playroutine v2

Minimal C64 music player v2 9- or 10-rasterline player with limited featureset. Wave / pulse / filtertables with "next column" instead of jumps Delaye

Lasse Öörni 10 Aug 1, 2022
The given files contains a coded algorithm for a program of "OMR Evaluation" With negative marking below are brief info regarding its feature

OMR-Evalution The given files contains a coded algorithm for a program of "OMR Evaluation" With negative marking below are brief info regarding its fe

Harsh Shrivastava 5 Oct 16, 2022
Obfuscate calls to imports by patching in stubs. ICO works on both X86 and X64 binaries.

ICO adds a new section into the image, then begins building stubs for each import that uses a extremely basic routine to decrypt an RVA and places them into the section.

null 40 Oct 12, 2022
A D++ Discord Bot template for Visual Studio 2019 (x64 and x86)

D++ Windows Bot Template A D++ Discord Bot template for Visual Studio 2019 (x64 and x86, release and debug). The result of this tutorial. This templat

brainbox.cc 24 Nov 6, 2022