blob: e828fddc5196b13c7d8980098842881c3991f13f [file] [log] [blame]
Alexey Romanov23435cf2023-01-10 13:56:48 +03001.. SPDX-License-Identifier: GPL-2.0+:
2
Heinrich Schuchardt60971e62024-01-14 14:53:13 +01003.. index::
4 single: sm (command)
5
Alexey Romanov23435cf2023-01-10 13:56:48 +03006sm command
7==========
8
Heinrich Schuchardt98b5ea12024-03-16 11:09:36 +01009Synopsis
10--------
Alexey Romanov23435cf2023-01-10 13:56:48 +030011
12::
13
14 sm serial <address>
15 sm reboot_reason [name]
16 sm efuseread <offset> <size> <address>
17 sm efusewrite <offset> <size> <address>
18 sm efusedump <offset> <size>
19
20Description
21-----------
22
23The sm command is used to request services from the secure monitor. User
24can call secure monitor to request special TEE function, for example chip
25serial number info, reboot reason, etc.
26
27sm serial
28 Retrieve chip unique serial number from sm and write it to memory on
29 appropriate address.
30
31sm reboot_reason
32 Print reboot reason to the console, if parameter [name] isn't specified.
33 If parameter specified, set reboot reason string to environment variable
34 with this name.
35
36sm efuseread
37 Read <size> bytes starting from <offset> from efuse memory bank and write
38 result to the address <address>.
39
40sm efusewrite
41 Write into efuse memory bank, starting from <offset>, the <size> bytes
42 of data, located at address <address>.
43
Alexey Romanov8d9a0e62023-01-10 13:56:50 +030044sm efusedump
45 Read <size> bytes starting from <offset> from efuse memory bank and print
46 them to the console.
47
Alexey Romanov23435cf2023-01-10 13:56:48 +030048Configuration
49-------------
50
51To use the sm command you must specify CONFIG_CMD_MESON=y