Code Monkey home page Code Monkey logo

cpuid's People

Contributors

alucowie avatar citrus-it avatar gumix avatar jlevon avatar kleuter avatar maxha651 avatar msaitoh avatar pizhenwei avatar tycho avatar xdbob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpuid's Issues

A project name collision

Last week I used you project as an alternative to the CPUID functionality included into AIDA64.

Today I learned that there two different projects using the same name, another one being https://www.etallen.com/cpuid.html (under the GPL v2).

Now as it was born some years earlier:

Mon Feb  6 2006 Todd Allen <[email protected]>
	* Initial public release.

... and is included into at least Debian (IIRC), I guess something need to be done about the situation.
I doubt both project will merge. I think it would be nice to adjust name of the newer project, this repo.

At least this project seems to be cross-platform, so maybe it could be renamed into cross-cpuid, cpuid-new or something alike?

Add cpuid man page

I would be helpful to have cpuid man page.

I created one for the OpenIndiana project based on your README.md: OpenIndiana/oi-userland#4345

The source is cpuid.ronn which can be parsed via ronn to cpuid.1. The latter one can be edited manually as well.

Memory leak

[sanity.c:252]: (error) Memory leak: apic_ids
[sanity.c:252]: (error) Memory leak: apic_copy

Build error at link time

Hello,
I have an issue building the tool:

$ make
    GEN license.h
    GEN build.h
    * rebuilding cpuid: new build flags or prefix
    CC cache.o
    CC clock.o
    CC cpuid.o
    CC feature.o
    CC handlers.o
    CC main.o
    CC sanity.o
    CC threads.o
    CC util.o
    CC version.o
    LD cpuid
/bin/ld: cache.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: cpuid.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: feature.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: handlers.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: main.o: relocation R_X86_64_32S against symbol `cpuid_dump_normal' can not be used when making a shared object; recompile with -fPIC
/bin/ld: sanity.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: threads.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/bin/ld: version.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:130: cpuid] Error 1
make: *** [GNUmakefile:52: top-level-make] Error 2

Here are the version I am using on my tools:

$ gcc --version
gcc (GCC) 7.2.1 20171224
$ ld --version
GNU ld (GNU Binutils) 2.29.1
$ make --version
GNU Make 4.2.1
$ perl --version
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi

I tried to append the -fPIC flag to the CFLAGS variable in the GNUmakefile but that did not solve the issue.
However after another test, I noticed that there is a line explicitly removing the -fPIC option (https://github.com/tycho/cpuid/blob/master/GNUmakefile#L77)

By changing it to -fPIC I could build properly.

a question

how to compile to support both i386 & x64bit?

Thanks

Not dumping leaf 0x10

In handlers.c, the functions handle_dump_std_0F and handle_dump_std_10 both read EAX 0xf, so it's not dumping cpuid 0x10, and is dumping 0xf twice.

Add 0x80000008 (specifically EBX for AMD)

Hi Steven,

If I didn't miss it, any chance you could add 0x80000008 EBX for AMD?

see: http://elixir.free-electrons.com/linux/v4.15-rc9/source/arch/x86/include/asm/cpufeatures.h

/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
#define X86_FEATURE_CLZERO		(13*32+ 0) /* CLZERO instruction */
#define X86_FEATURE_IRPERF		(13*32+ 1) /* Instructions Retired Count */
#define X86_FEATURE_XSAVEERPTR		(13*32+ 2) /* Always save/restore FP error pointers */

and: http://support.amd.com/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf

under: CPUID_Fn80000008_EBX [Extended Feature Extensions ID EBX] (FeatureExtIdEbx)

Much obliged!

Doesn't compile in Visual Studio 2013

1>------ Rebuild All started: Project: CPUID, Configuration: Debug Win32 ------
1>  prefix.c
1>  version.c
1>  util.c
1>  threads.c
1>  sanity.c
1>g:\projects\macsfancontrol\cpuid-master\clock.h(29): error C2065: '__asm__' : undeclared identifier
1>g:\projects\macsfancontrol\cpuid-master\clock.h(29): error C2146: syntax error : missing ';' before identifier '__volatile__'
1>g:\projects\macsfancontrol\cpuid-master\clock.h(29): warning C4013: '__volatile__' undefined; assuming extern returning int
1>g:\projects\macsfancontrol\cpuid-master\clock.h(29): error C2143: syntax error : missing ')' before ':'
1>  main.c
1>  handlers.c
1>g:\projects\macsfancontrol\cpuid-master\handlers.c(709): warning C4018: '>=' : signed/unsigned mismatch
1>g:\projects\macsfancontrol\cpuid-master\handlers.c(1361): error C2143: syntax error : missing ':' before '...'
1>  getopt_long.c
1>  feature.c
1>g:\projects\macsfancontrol\cpuid-master\feature.c(1068): warning C4013: 'snprintf' undefined; assuming extern returning int
1>  cpuid.c
1>  cache.c
1>g:\projects\macsfancontrol\cpuid-master\cache.c(174): warning C4244: 'initializing' : conversion from 'double' to 'uint32_t', possible loss of data
1>  Generating Code...
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.