doc: man-page for optee commands
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Thu, 19 Dec 2024 04:39:18 +0000 (10:09 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 2 Jan 2025 17:07:54 +0000 (11:07 -0600)
Provide a man-page for the optee command.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
doc/usage/cmd/optee.rst [new file with mode: 0644]
doc/usage/index.rst

diff --git a/doc/usage/cmd/optee.rst b/doc/usage/cmd/optee.rst
new file mode 100644 (file)
index 0000000..46c569a
--- /dev/null
@@ -0,0 +1,70 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. index::
+   single: optee (command)
+
+optee command
+=============
+
+Synopsis
+--------
+
+::
+
+    optee hello
+    optee hello <value>
+
+Description
+-----------
+
+This is an OP-TEE sanity test which invokes the "Hello World"
+Trusted Application (TA). The TA does two things:
+- It prints debug and information messages to the secure console (if logging is enabled)
+- It increments the integer value passed as a parameter and returns it
+
+
+value
+       Integer value that the TA is expected to increment and return.
+       The default value is 0.
+
+To enable the OP-TEE Hello World example please refer
+https://optee.readthedocs.io/en/latest/building/gits/optee_examples/optee_examples.html
+
+Examples
+--------
+
+::
+
+       ==> optee hello
+       D/TA:  TA_CreateEntryPoint:39 has been called
+       I/TA: Hello World!
+       Value before: 0x0
+       Calling TA
+       D/TA:  inc_value:105 has been called
+       I/TA: Got value: 0 from NW
+       I/TA: Increase value to: 1
+       Value after: 0x1
+       I/TA: Goodbye!
+       D/TA:  TA_DestroyEntryPoint:50 has been called
+
+       ==> optee hello 74
+       D/TA:  TA_CreateEntryPoint:39 has been called
+       I/TA: Hello World!
+       Value before: 0x74
+       Calling TA
+       D/TA:  inc_value:105 has been called
+       I/TA: Got value: 116 from NW
+       I/TA: Increase value to: 117
+       Value after: 0x75
+       I/TA: Goodbye!
+       D/TA:  TA_DestroyEntryPoint:50 has been called
+
+Configuration
+-------------
+
+The optee command is enabled by CONFIG_OPTEE=y and CONFIG_CMD_OPTEE=y.
+
+Return value
+------------
+
+The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise.
index cb7a23f..4dd00f0 100644 (file)
@@ -92,6 +92,7 @@ Shell commands
    cmd/msr
    cmd/mtest
    cmd/mtrr
+   cmd/optee
    cmd/panic
    cmd/part
    cmd/pause