1cpuid(4)                   Kernel Interfaces 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 is 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  in‐
28       line  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 /sys/de‐
33       vices/system/cpu.  Direct CPUID access through this device should  only
34       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       cpuid(1)
48
49       Intel  Corporation,  Intel  64  and IA-32 Architectures Software Devel‐
50       oper's Manual Volume 2A: Instruction Set Reference,  A-M,  3-180  CPUID
51       reference.
52
53       Intel  Corporation,  Intel  Processor  Identification and the CPUID In‐
54       struction, Application note 485.
55
56
57
58Linux man-pages 6.04              2022-10-30                          cpuid(4)
Impressum