summaryrefslogtreecommitdiff
path: root/doc/usage/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'doc/usage/cmd')
-rw-r--r--doc/usage/cmd/bootmeth.rst38
-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/cmd/tcpm.rst66
6 files changed, 248 insertions, 6 deletions
diff --git a/doc/usage/cmd/bootmeth.rst b/doc/usage/cmd/bootmeth.rst
index c3d2ec1574b..4f899d92b2e 100644
--- a/doc/usage/cmd/bootmeth.rst
+++ b/doc/usage/cmd/bootmeth.rst
@@ -12,7 +12,8 @@ Synopsis
::
bootmeth list [-a] - list selected bootmeths (-a for all)
- bootmeth order "[<bm> ...]" - select the order of bootmeths\n"
+ bootmeth order "[<bm> ...]" - select the order of bootmeths
+ bootmeth set <bootmeth> <property> <value> - set optional property
Description
@@ -112,3 +113,38 @@ which are not::
- 4 efi_mgr EFI bootmgr flow
----- --- ------------------ ------------------
(5 bootmeths)
+
+
+bootmeth set
+~~~~~~~~~~~~
+
+Allows setting of bootmeth specific configuration. This allows finer grain
+control over the boot process in specific instances.
+
+
+Supported Configuration Options
+-------------------------------
+
+The following configuration options are currently supported:
+
+======== =================== ====== ===============================
+Property Supported Bootmeths Values Description
+======== =================== ====== ===============================
+fallback extlinux 0 | 1 Enable or disable fallback path
+======== =================== ====== ===============================
+
+
+Bootmeth set Example
+--------------------
+
+With the bootcount functionality enabled, when the bootlimit is reached, the
+`altbootcmd` environment variable lists the command used for booting rather
+than `bootcmd`. We can set the fallback configuration to cause the fallback
+boot option to be preferred, to revert to a previous known working boot option
+after a failed update for example. So if `bootcmd` is set to::
+
+ bootflow scan -lb
+
+We would set "altbootcmd" to::
+
+ bootmeth set extlinux fallback 1; bootflow scan -lb
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/cmd/tcpm.rst b/doc/usage/cmd/tcpm.rst
new file mode 100644
index 00000000000..eb2c69d0bdb
--- /dev/null
+++ b/doc/usage/cmd/tcpm.rst
@@ -0,0 +1,66 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+.. index::
+ single: tcpm (command)
+
+tcpm command
+============
+
+Synopsis
+--------
+
+::
+
+ tcpm dev [devnum]
+ tcpm info
+ tcpm list
+
+Description
+-----------
+
+The tcpm command is used to control USB-PD controllers, also known as TypeC Port Manager (TCPM).
+
+The 'tcpm dev' command shows or set current TCPM device.
+
+ devnum
+ device number to change
+
+The 'tcpm info' command displays the current state of the device
+
+The 'tcpm list' command displays the list available devices.
+
+Examples
+--------
+
+The 'tcpm info' command displays device's status:
+::
+
+ => tcpm info
+ Orientation: normal
+ PD Revision: rev3
+ Power Role: sink
+ Data Role: device
+ Voltage: 20.000 V
+ Current: 2.250 A
+
+The current device can be shown or set via 'tcpm dev' command:
+::
+
+ => tcpm dev
+ TCPM device is not set!
+ => tcpm dev 0
+ dev: 0 @ usb-typec@22
+ => tcpm dev
+ dev: 0 @ usb-typec@22
+
+The list of available devices can be shown via 'tcpm list' command:
+::
+
+ => tcpm list
+ | ID | Name | Parent name | Parent uclass @ seq
+ | 0 | usb-typec@22 | i2c@feac0000 | i2c @ 4 | status: 0
+
+Configuration
+-------------
+
+The tcpm command is only available if CONFIG_CMD_TCPM=y.