# phpman > man > cpuid(4)

[CPUID(4)](https://www.chedong.com/phpMan.php/man/CPUID/4/markdown)                              Linux Programmer's Manual                             [CPUID(4)](https://www.chedong.com/phpMan.php/man/CPUID/4/markdown)



## NAME
       cpuid - x86 CPUID access device

## DESCRIPTION
       CPUID provides an interface for querying information about the x86 CPU.

       This device is accessed by [**lseek**(2)](https://www.chedong.com/phpMan.php/man/lseek/2/markdown) or [**pread**(2)](https://www.chedong.com/phpMan.php/man/pread/2/markdown) to the appropriate CPUID level and reading in
       chunks of 16 bytes.  A larger read size means multiple reads of consecutive levels.

       The lower 32 bits of the file position is used as the incoming _%eax_, and the upper 32 bits of
       the file position as the incoming _%ecx_, the latter is intended for "counting" _eax_ levels like
       _eax=4_.

       This driver uses _/dev/cpu/CPUNUM/cpuid_, where _CPUNUM_ is the minor number, and on an  SMP  box
       will direct the access to CPU _CPUNUM_ as listed in _/proc/cpuinfo_.

       This  file is protected so that it can be read only by the user _root_, or members of the group
       _root_.

## NOTES
       The CPUID instruction can be directly executed by a program using inline assembler.   However
       this device allows convenient access to all CPUs without changing process affinity.

       Most  of  the  information  in  _cpuid_  is  reported  by  the  kernel in cooked form either in
       _/proc/cpuinfo_ or through subdirectories  in  _/sys/devices/system/cpu_.   Direct  CPUID  access
       through this device should only be used in exceptional cases.

       The  _cpuid_ driver is not auto-loaded.  On modular kernels you might need to use the following
       command to load it explicitly before use:

           $ modprobe cpuid

       There is no support for CPUID functions that require additional input registers.

       Very old x86 CPUs don't support CPUID.

## SEE ALSO
       [**cpuid**(1)](https://www.chedong.com/phpMan.php/man/cpuid/1/markdown)

       Intel Corporation, Intel 64 and IA-32 Architectures Software Developer's  Manual  Volume  2A:
       Instruction Set Reference, A-M, 3-180 CPUID reference.

       Intel Corporation, Intel Processor Identification and the CPUID Instruction, Application note
       485.

## COLOPHON
       This page is part of release 5.10 of the Linux  _man-pages_  project.   A  description  of  the
       project,  information about reporting bugs, and the latest version of this page, can be found
       at <https://www.kernel.org/doc/man-pages/>.



Linux                                        2019-08-02                                     [CPUID(4)](https://www.chedong.com/phpMan.php/man/CPUID/4/markdown)
