1CPUID(4)                   Linux Programmer's Manual                  CPUID(4)
2
3
4

NAME

6       cpuid - x86 CPUID access device
7

DESCRIPTION

9       CPUID provides an interface for querying information about the x86 CPU.
10
11       This  device  is  accessed  by  lseek(2) or pread(2) to the appropriate
12       CPUID level and reading in chunks of 16  bytes.   A  larger  read  size
13       means multiple reads of consecutive levels.
14
15       The  lower  32  bits of the file position is used as the incoming %eax,
16       and the upper 32 bits of the file position as the  incoming  %ecx,  the
17       latter intended for "counting" eax levels like eax=4.
18
19       This  driver uses /dev/cpu/CPUNUM/cpuid, where CPUNUM is the minor num‐
20       ber, and on an SMP box will direct the access to CPU CPUNUM  as  listed
21       in /proc/cpuinfo.
22
23       This file is protected so that it can be read only by the user root, or
24       members of the group root.
25

NOTES

27       The CPUID instruction can be  directly  executed  by  a  program  using
28       inline  assembler.  However this device allows convenient access to all
29       CPUs without changing process affinity.
30
31       Most of the information in cpuid is reported by the  kernel  in  cooked
32       form   either   in   /proc/cpuinfo   or   through   subdirectories   in
33       /sys/devices/system/cpu.   Direct  CPUID  access  through  this  device
34       should only be used in exceptional cases.
35
36       The cpuid driver is not auto-loaded.  On modular kernels you might need
37       to use the following command to load it explicitly before use:
38
39            $ modprobe cpuid
40
41       There is no support for CPUID functions that require  additional  input
42       registers.
43
44       Very old x86 CPUs don't support CPUID.
45

SEE ALSO

47       Intel  Corporation,  Intel  64  and IA-32 Architectures Software Devel‐
48       oper's Manual Volume 2A: Instruction Set Reference,  A-M,  3-180  CPUID
49       reference.
50
51       Intel   Corporation,  Intel  Processor  Identification  and  the  CPUID
52       Instruction, Application note 485.
53

COLOPHON

55       This page is part of release 3.53 of the Linux  man-pages  project.   A
56       description  of  the project, and information about reporting bugs, can
57       be found at http://www.kernel.org/doc/man-pages/.
58
59
60
61Linux                             2009-03-31                          CPUID(4)
Impressum