• Stars
    star
    151
  • Rank 246,057 (Top 5 %)
  • Language
    C
  • License
    ISC License
  • Created over 13 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple CPUID decoder/dumper for x86/x86_64

CPUID Build status License: ISC

"cpuid" is a very simple C program, designed to dump and extract information from the x86 CPUID instruction.

cpuid is capable of dumping all CPUID leaves (except any unknown leaves which require special ECX values to dump all information). cpuid can only decode certain leaves, but this functionality will be expanded as the CPUID specifications provided by AMD and Intel change.

Building

The build process is simplified compared to a plethora of other open source projects out there. You don't need autoconf/automake or any of the headaches that go along with those tools.

Required:

  • C compiler (GNU C Compiler, LLVM/Clang, Microsoft Visual C++, and the Intel C++ Compiler are known to work)
  • Perl 5.8 or later

And one of:

  • GNU Make 3.80 or later
  • Meson 0.50 or later

Depending on whether you have GNU Make or Meson, do one of:

$ meson . build
$ ninja -C build

or

$ make

And you should have a new executable called 'cpuid' in a few seconds.

Usage

Since the usage will likely change over time, I recommend that you take a look at the output of:

$ ./cpuid --help

Reporting Bugs

If you find a bug in CPUID, please submit details about it to the issue tracker on GitHub.

If the bug is regarding the decoding or dumping of CPUID details, then you should include the dump.txt and decode.txt generated with these commands:

$ ./cpuid -d -c -1 > dump.txt
$ ./cpuid -c -1 > decode.txt

You should also specify what revision of CPUID you are running. If you don't know, you can find out with:

$ ./cpuid --version

Reference Documentation

You can find current Intel and AMD CPUID specifications at these locations:

I try to keep up with these as they change, but sometimes I'm slow on the uptake. Please notify me if you notice any inconsistencies or if features you find relevant are not being decoded.

Contact

I'm reachable via email and respond frequently.

Steven Noonan <[email protected]>

More Repositories

1

crisscross

A C++ library with various uses.
C++
38
star
2

sheepshaver

SheepShaver, a PowerPC emulator capable of running Mac OS 7.5.2 through 9.0.4
C++
29
star
3

clockperf

clocksource behavior microbenchmarks
C
24
star
4

nbody

Portable auto-vectorizable n-body benchmark
Cuda
15
star
5

basiliskii

Basilisk II, an m68k Mac emulator
C++
13
star
6

cerberus

A game engine by Uplink Laboratories and Ferrous Moon
C
11
star
7

nethack

NetHack; the best game ever, since 1984
C
11
star
8

devcpp

Orwell Dev-C++
Pascal
9
star
9

cpu-test-arm

CPU_TEST for ARM, a simple suite of microbenchmarks for the ARMv7 architecture (Cortex A8, A9, and others)
C
9
star
10

pearpc

PearPC; a cross-platform PowerPC emulator
C++
8
star
11

luajit

LuaJIT 2.0 development repository
C
8
star
12

cpuid-rs

CPUID implemented in Rust
Rust
6
star
13

grass

A simple OpenGL benchmark
C
5
star
14

arc

ARC++; a clone of Sierra's ARC
C
5
star
15

xchat

X-Chat (CVS mirror)
C
5
star
16

genprime

A programming language shootout in multiple languages.
Makefile
5
star
17

fio

Flexible I/O tester, by Jens Axboe
C
4
star
18

crawl

Dungeon Crawl Stone Soup
C++
4
star
19

libtime

Simple library for high-resolution timing
C
3
star
20

compiler-testing

My compiler testing playground.
C
2
star
21

axel

Import of Axel download accelerator history, along with some improvements of my own
C
2
star
22

libc11

Thin library implementing missing C11 features for glibc
C
2
star
23

openarc-vb

OpenARC, a clone of Sierra's ARC. Written in VB.
Visual Basic
2
star
24

vim-pave

Basic Perforce functionality.
Python
1
star
25

nbody-go

N-body implementation in go
Go
1
star
26

microbench

Various microbenchmarks and tests.
C
1
star
27

gpg-signing-test-repo

Testing commit signing with different OpenPGP key types.
1
star