From: Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
To: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: cpuid(7) manpage
Date: Sun, 22 Feb 2009 18:06:16 +0100 [thread overview]
Message-ID: <20090222170616.GA23612@one.firstfloor.org> (raw)
Simple manpage for the cpuid devices.
-Andi
.\" Description based on comment in arch/x86/kernel/cpuid.c
.TH MSR 7 2009-02-22 "Linux" "Linux Programmer's Manual"
.SH NAME
cpuid \- x86 CPUID access device
.SH DESCRIPTIONS
CPUID allows to query information about the x86 CPU.
This device is accessed by
.I lseek(2)
or
.I pread(2)
to the appropriate CPUID level
and then read in chunks of 16 bytes. A larger 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 intended for "counting" eax levels like eax=4.
This driver uses
.I /dev/cpu/CPUNUM/cpuid
where
.I CPUNUM is the minor number, and on
an SMP box will direct the access to CPU CPUNUM as listed in
.I /proc/cpuinfo.
.SH 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
.I /proc/cpuinfo
or through sub directories in
.I /sys/devices/system/cpu
Direct cpuid access through this device should only
be used in exceptional cases.
The
.I cpuid
driver is not auto-loaded. On modular kernel you might need to use
.B modprobe cpuid
to load it explicitely before use.
There is no support for cpuid functions that require additional
input registers.
Very old x86 CPUs don't support CPUID.
.SH SEE ALSO
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2009-02-22 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-22 17:06 Andi Kleen [this message]
[not found] ` <20090222170616.GA23612-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2009-03-30 20:57 ` cpuid(7) manpage Michael Kerrisk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090222170616.GA23612@one.firstfloor.org \
--to=andi-vw/nlti1exurpaaqcnn02g@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox