blob: cccf9262ed4d80c7a6bd117804b8f6e51a83e43b [file] [log] [blame]
Simon Glass8af719c2024-08-27 19:44:28 -06001.. SPDX-License-Identifier: GPL-2.0+
2
3.. index::
4 single: cpuid (command)
5
6cpuid command
7=============
8
9Synopsis
10--------
11
12::
13
14 cpuid <op>
15
16Description
17-----------
18
19The cpuid command requests CPU-identification information on x86 CPUs. The
20operation <op> selects what information is returned. Up to four 32-bit registers
21can be update (eax-edx) depending on the operation.
22
23Configuration
24-------------
25
26The cpuid command is only available on x86.
27
28Return value
29------------
30
31The return value $? is 0 (true).
32
33Example
34-------
35
36::
37
38 => cpuid 1
39 eax 00060fb1
40 ebx 00040800
41 ecx 80002001
42 edx 178bfbfd
43
44This shows checking for 64-bit 'long' mode::
45
46 => cpuid 80000000
47 eax 8000000a
48 ebx 68747541
49 ecx 444d4163
50 edx 69746e65
51 => cpuid 80000001
52 eax 00060fb1
53 ebx 00000000
54 ecx 00000007
55 edx 2193fbfd # Bit 29 is set in edx, so long mode is available
56
57On a 32-bit-only CPU::
58
59 => cpuid 80000000
60 eax 80000004
61 ebx 756e6547
62 ecx 6c65746e
63 edx 49656e69
64 => cpuid 80000001
65 eax 00000663
66 ebx 00000000
67 ecx 00000000
68 edx 00000000 # Bit 29 is not set in edx, so long mode is not available