Venkatesh Yadav Abbarapu | a8656c2 | 2024-12-19 10:09:18 +0530 | [diff] [blame^] | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | .. index:: |
| 4 | single: optee (command) |
| 5 | |
| 6 | optee command |
| 7 | ============= |
| 8 | |
| 9 | Synopsis |
| 10 | -------- |
| 11 | |
| 12 | :: |
| 13 | |
| 14 | optee hello |
| 15 | optee hello <value> |
| 16 | |
| 17 | Description |
| 18 | ----------- |
| 19 | |
| 20 | This is an OP-TEE sanity test which invokes the "Hello World" |
| 21 | Trusted Application (TA). The TA does two things: |
| 22 | - It prints debug and information messages to the secure console (if logging is enabled) |
| 23 | - It increments the integer value passed as a parameter and returns it |
| 24 | |
| 25 | |
| 26 | value |
| 27 | Integer value that the TA is expected to increment and return. |
| 28 | The default value is 0. |
| 29 | |
| 30 | To enable the OP-TEE Hello World example please refer |
| 31 | https://optee.readthedocs.io/en/latest/building/gits/optee_examples/optee_examples.html |
| 32 | |
| 33 | Examples |
| 34 | -------- |
| 35 | |
| 36 | :: |
| 37 | |
| 38 | ==> optee hello |
| 39 | D/TA: TA_CreateEntryPoint:39 has been called |
| 40 | I/TA: Hello World! |
| 41 | Value before: 0x0 |
| 42 | Calling TA |
| 43 | D/TA: inc_value:105 has been called |
| 44 | I/TA: Got value: 0 from NW |
| 45 | I/TA: Increase value to: 1 |
| 46 | Value after: 0x1 |
| 47 | I/TA: Goodbye! |
| 48 | D/TA: TA_DestroyEntryPoint:50 has been called |
| 49 | |
| 50 | ==> optee hello 74 |
| 51 | D/TA: TA_CreateEntryPoint:39 has been called |
| 52 | I/TA: Hello World! |
| 53 | Value before: 0x74 |
| 54 | Calling TA |
| 55 | D/TA: inc_value:105 has been called |
| 56 | I/TA: Got value: 116 from NW |
| 57 | I/TA: Increase value to: 117 |
| 58 | Value after: 0x75 |
| 59 | I/TA: Goodbye! |
| 60 | D/TA: TA_DestroyEntryPoint:50 has been called |
| 61 | |
| 62 | Configuration |
| 63 | ------------- |
| 64 | |
| 65 | The optee command is enabled by CONFIG_OPTEE=y and CONFIG_CMD_OPTEE=y. |
| 66 | |
| 67 | Return value |
| 68 | ------------ |
| 69 | |
| 70 | The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise. |