1 .\" Copyright (c) 2009 Intel Corporation, Author Andi Kleen
2 .\" Description based on comments in arch/x86/kernel/cpuid.c
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
26 .TH CPUID 4 2019-08-02 "Linux" "Linux Programmer's Manual"
28 cpuid \- x86 CPUID access device
30 CPUID provides an interface for querying information about the x86 CPU.
32 This device is accessed by
36 to the appropriate CPUID level and reading in chunks of 16 bytes.
37 A larger read size means multiple reads of consecutive levels.
39 The lower 32 bits of the file position is used as the incoming
41 and the upper 32 bits of the file position as the incoming
43 the latter is intended for "counting"
49 .IR /dev/cpu/CPUNUM/cpuid ,
53 and on an SMP box will direct the access to CPU
58 This file is protected so that it can be read only by the user
60 or members of the group
63 The CPUID instruction can be directly executed by a program
64 using inline assembler.
65 However this device allows convenient
66 access to all CPUs without changing process affinity.
68 Most of the information in
70 is reported by the kernel in cooked form either in
72 or through subdirectories in
73 .IR /sys/devices/system/cpu .
74 Direct CPUID access through this device should only
75 be used in exceptional cases.
79 driver is not auto-loaded.
80 On modular kernels you might need to use the following command
81 to load it explicitly before use:
89 There is no support for CPUID functions that require additional
92 Very old x86 CPUs don't support CPUID.
96 Intel Corporation, Intel 64 and IA-32 Architectures
97 Software Developer's Manual Volume 2A:
98 Instruction Set Reference, A-M, 3-180 CPUID reference.
100 Intel Corporation, Intel Processor Identification and
101 the CPUID Instruction, Application note 485.