u-boot/doc/usage/cmd/cpuid.rst
Tom Rini 11da3403e9 doc: usage: Add general rule for $?
For nearly all commands in U-Boot the '?' variable is handled the same
way with 0 meaning success, 1 meaning any failure.  Explain this in the
general rules section of the cmdline documentation (with a link to a
counter example) and then remove the redundant wording from most
commands. We retain a section about the return value in a number of
places where we are doing something such as always returning a specific
value or we have useful additional information to go along with the
normal return codes.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-10-26 09:03:35 -06:00

64 lines
1.1 KiB
ReStructuredText

.. SPDX-License-Identifier: GPL-2.0+
.. index::
single: cpuid (command)
cpuid command
=============
Synopsis
--------
::
cpuid <op>
Description
-----------
The cpuid command requests CPU-identification information on x86 CPUs. The
operation <op> selects what information is returned. Up to four 32-bit registers
can be update (eax-edx) depending on the operation.
Configuration
-------------
The cpuid command is only available on x86.
Example
-------
::
=> cpuid 1
eax 00060fb1
ebx 00040800
ecx 80002001
edx 178bfbfd
This shows checking for 64-bit 'long' mode::
=> cpuid 80000000
eax 8000000a
ebx 68747541
ecx 444d4163
edx 69746e65
=> cpuid 80000001
eax 00060fb1
ebx 00000000
ecx 00000007
edx 2193fbfd # Bit 29 is set in edx, so long mode is available
On a 32-bit-only CPU::
=> cpuid 80000000
eax 80000004
ebx 756e6547
ecx 6c65746e
edx 49656e69
=> cpuid 80000001
eax 00000663
ebx 00000000
ecx 00000000
edx 00000000 # Bit 29 is not set in edx, so long mode is not available