.\" Copyright (c) 2009 Intel Corporation, Author Andi Kleen .\" Description based on comments in arch/x86/kernel/cpuid.c .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH CPUID 4 " 2019\-08\-02" Linux "Linux Programmer's Manual" .SH 名前 cpuid \- x86 CPUID アクセスデバイス .SH 説明 CPUID は x86 CPU に関する情報を問い合わせるためのインターフェースを提供する。 .PP このデバイスには \fBlseek\fP(2) と \fBpread\fP(2) を使って、 適切な CPUID レベルにアクセスし、 16 バイトのデータを読み出す。 もっと大きな読み出しサイズを指定すると、 連続する複数のレベルが読み出される。 .PP ファイル位置の下位 32 ビットは次の \fI%eax\fP として使用され、 ファイル位置の上位 32 ビットは次の \fI%ecx\fP として使用される。 後者は、 \fIeax=4\fP のように \fIeax\fP レベルを数えるのを意図したものである。 .PP このドライバーは \fI/dev/cpu/CPUNUM/cpuid\fP を使用する。 なお \fICPUNUM\fP はマイナー番号である。 SMP マシンでは、 このドライバーは \fI/proc/cpuinfo\fP に載っている CPU \fICPUNUM\fP にアクセスする。 .PP このファイルは、 ユーザー \fIroot\fP またはグループ \fIroot\fP だけが読み出しできるように保護されている。 .SH 注意 CPUID 命令はインラインアセンブラーを使ってプログラムで直接実行できる。 しかし、 このデバイスを使うことで、 プロセスの affinity を変更せずにすべての CPU に便利にアクセスできる。 .PP \fIcpuid\fP の情報のほとんどは、 \fI/proc/cpuinfo\fP か、 \fI/sys/devices/system/cpu\fP のサブディレクトリ経由で読みやすい形で参照できる。 このデバイス経由で直接 CPUID にアクセスするのは例外的な場合にだけにすべきである。 .PP \fIcpuid\fP ドライバーは自動ではロードされない。 モジュールに対応したカーネルでは、 使用する前に以下のコマンドを使って明示的にロードする必要がある。 .PP .in +4n .EX $ modprobe cpuid .EE .in .PP 追加の入力レジスターが必要な CPUID 機能はサポートされていない。 .PP 非常に古い x86 CPU では CPUID はサポートされていない。 .SH 関連項目 \fBcpuid\fP(1) .PP Intel Corporation, Intel 64 and IA\-32 Architectures Software Developer's Manual Volume 2A: Instruction Set Reference, A\-M, 3\-180 CPUID reference. .PP Intel Corporation, Intel Processor Identification and the CPUID Instruction, Application note 485. .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。