summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/cedit.rst15
-rw-r--r--doc/usage/cmd/cpuid.rst68
-rw-r--r--doc/usage/cmd/font.rst6
-rw-r--r--doc/usage/cmd/msr.rst61
-rw-r--r--doc/usage/index.rst2
5 files changed, 147 insertions, 5 deletions
diff --git a/doc/usage/cmd/cedit.rst b/doc/usage/cmd/cedit.rst
index 5670805a00e..f29f1b3f388 100644
--- a/doc/usage/cmd/cedit.rst
+++ b/doc/usage/cmd/cedit.rst
@@ -107,8 +107,10 @@ That results in::
/ {
cedit-values {
cpu-speed = <0x00000006>;
+ cpu-speed-value = <0x00000003>;
cpu-speed-str = "2 GHz";
power-loss = <0x0000000a>;
+ power-loss-value = <0x00000000>;
power-loss-str = "Always Off";
};
}
@@ -118,16 +120,23 @@ That results in::
This shows settings being stored in the environment::
=> cedit write_env -v
- c.cpu-speed=7
+ c.cpu-speed=11
c.cpu-speed-str=2.5 GHz
- c.power-loss=12
- c.power-loss-str=Memory
+ c.cpu-speed-value=3
+ c.power-loss=14
+ c.power-loss-str=Always Off
+ c.power-loss-value=0
+ c.machine-name=my-machine
+ c.cpu-speed=11
+ c.power-loss=14
+ c.machine-name=my-machine
=> print
...
c.cpu-speed=6
c.cpu-speed-str=2 GHz
c.power-loss=10
c.power-loss-str=Always Off
+ c.machine-name=my-machine
...
=> cedit read_env -v
diff --git a/doc/usage/cmd/cpuid.rst b/doc/usage/cmd/cpuid.rst
new file mode 100644
index 00000000000..cccf9262ed4
--- /dev/null
+++ b/doc/usage/cmd/cpuid.rst
@@ -0,0 +1,68 @@
+.. 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.
+
+Return value
+------------
+
+The return value $? is 0 (true).
+
+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
diff --git a/doc/usage/cmd/font.rst b/doc/usage/cmd/font.rst
index a8782546333..44a04f5d075 100644
--- a/doc/usage/cmd/font.rst
+++ b/doc/usage/cmd/font.rst
@@ -13,7 +13,7 @@ Synopsis
font list
font select <name> [<size>]
- font size <size>
+ font size [<size>]
Description
-----------
@@ -34,7 +34,7 @@ This selects a new font and optionally changes the size.
font size
~~~~~~~~~
-This changes the font size only.
+This changes the font size only. With no argument it shows the current size.
Examples
--------
@@ -44,6 +44,8 @@ Examples
=> font list
nimbus_sans_l_regular
cantoraone_regular
+ => font size
+ 30
=> font size 40
=> font select cantoraone_regular 20
=>
diff --git a/doc/usage/cmd/msr.rst b/doc/usage/cmd/msr.rst
new file mode 100644
index 00000000000..04ee52cc1c7
--- /dev/null
+++ b/doc/usage/cmd/msr.rst
@@ -0,0 +1,61 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+.. index::
+ single: msr (command)
+
+msr command
+===========
+
+Synopsis
+--------
+
+::
+
+ msr read <op>
+ msr write <op> <hi> <lo>
+
+Description
+-----------
+
+The msr command reads and writes machine-status registers (MSRs) on x86 CPUs.
+The information is a 64-bit value split into two parts, <hi> for the top 32
+bits and <lo> for the bottom 32 bits.
+
+The operation <op> selects what information is read or written.
+
+msr read
+~~~~~~~~
+
+This reads an MSR and displays the value obtained.
+
+msr write
+~~~~~~~~~
+
+This writes a value to an MSR.
+
+Configuration
+-------------
+
+The msr command is only available on x86.
+
+Return value
+------------
+
+The return value $? is 0 (true).
+
+Example
+-------
+
+This shows reading msr 0x194 which is MSR_FLEX_RATIO on Intel CPUs::
+
+ => msr read 194
+ 00000000 00011200 # Bits 16 (flex ratio enable) and 20 (lock) are set
+
+This shows adjusting the energy-performance bias on an Intel CPU::
+
+ => msr read 1b0
+ 00000000 00000006 # 6 means 'normal'
+
+ => msr write 1b0 0 f # change to power-save
+ => msr read 1b0
+ 00000000 0000000f
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index fcce125a611..b84d8ee909f 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -52,6 +52,7 @@ Shell commands
cmd/conitrace
cmd/cp
cmd/cpu
+ cmd/cpuid
cmd/cyclic
cmd/dm
cmd/ebtupdate
@@ -86,6 +87,7 @@ Shell commands
cmd/mbr
cmd/md
cmd/mmc
+ cmd/msr
cmd/mtest
cmd/mtrr
cmd/panic