1CPUID(4) Linux Programmer's Manual CPUID(4)
2
3
4
6 cpuid - x86 CPUID access device
7
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
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
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
54 Instruction, Application note 485.
55
57 This page is part of release 5.02 of the Linux man-pages project. A
58 description of the project, information about reporting bugs, and the
59 latest version of this page, can be found at
60 https://www.kernel.org/doc/man-pages/.
61
62
63
64Linux 2019-08-02 CPUID(4)