mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 05:58:49 +00:00
Pull request doc-2024-04-rc6
Documentation: * man page of 'itest' * tee: sandbox: fix spelling errors in function documentation -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmYFymMACgkQhO4vgnE3 U0t7zhAArvxIE++lvrIrTxo7n/aG7JwWg0QHrfKoHtK07ZVYQrCmu5gadm3E8w1K WdlNVC7mVlZjCaFeRF4xXD2XdDgVlcckstAeVSmuJoXF4m+bM4zxsc/2NimJcWGJ yBJA7Hg3ZEe6WL1JhmCnV7Qt0VNxTXKIUWx15H6uzJxu0C1u2k6y9qzYDOk+or17 vw2vp68tGfQ3XxWnzOlebI6ME9JVFMCHUoQ/hjgvJv6YUGs4MWR5unuTtTr4Pmi+ EU2xX8YTlJOID/jfEO8FngfSjZX3JIV67dOU8anmXp1kkAs2w/cZ1NweEqGx9G6W FxcAYLhPFaPbZqNHReeHWWTuaofmMVPUTd1F4g4C9XwP/9giAg+VzC+DTq+stYDq rlOcFx1Zg50soEPlfl6W/ro048CcJxGofhm1GlilwX27CchG5FrjPFU5Tv4XN5AR V6HDQjiEbXdeimTwc4RKvPde0XwGiqHfYeInM1IIziYcQphIDQS3gMeoakMwRbIi vyqyTS/DdBfTMZ1LEWEpgnKSM4HzxoVLRbmuUcE8t2k4HgbrhQzzvuMVFjzL0yuK z1LBUoWpqxI7enHmhx16yEyPf1bB9Myaf87O47r8xkOfS5tNwuoS+irgN0wLLWs7 rVzMnNAOg6GPurMoMfYspnR+1LiEbkNV7e9kjht7xkmjPTtOUjs= =l1Z0 -----END PGP SIGNATURE----- Merge tag 'doc-2024-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi Pull request doc-2024-04-rc6 Documentation: * man page of 'itest' * tee: sandbox: fix spelling errors in function documentation
This commit is contained in:
commit
9468bf3a69
4 changed files with 121 additions and 7 deletions
|
@ -33,11 +33,11 @@ test statement
|
||||||
$? becomes 0 (true) the statements after the **then** statement will
|
$? becomes 0 (true) the statements after the **then** statement will
|
||||||
be executed. Otherwise the statements after the **else** statement.
|
be executed. Otherwise the statements after the **else** statement.
|
||||||
|
|
||||||
Example
|
Examples
|
||||||
-------
|
--------
|
||||||
|
|
||||||
The examples shows how the value of a numeric variable can be tested with
|
The examples shows how the value of a numeric variable can be tested with
|
||||||
**itest**.
|
the :doc:`itest <itest>` command.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
|
113
doc/usage/cmd/itest.rst
Normal file
113
doc/usage/cmd/itest.rst
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
.. SPDX-License-Identifier: GPL-2.0+
|
||||||
|
|
||||||
|
.. index::
|
||||||
|
single: itest (command)
|
||||||
|
|
||||||
|
itest command
|
||||||
|
=============
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
--------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
itest[.b | .w | .l | .q | .s] [*]<value1> <op> [*]<value2>
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The itest command is used to compare two values. The return value $? is set
|
||||||
|
accordingly.
|
||||||
|
|
||||||
|
By default it is assumed that the values are 4 byte integers. By appending a
|
||||||
|
postfix (.b, .w, .l, .q, .s) the size can be specified:
|
||||||
|
|
||||||
|
======= ======================================================
|
||||||
|
postfix meaning
|
||||||
|
======= ======================================================
|
||||||
|
.b 1 byte integer
|
||||||
|
.w 2 byte integer
|
||||||
|
.l 4 byte integer
|
||||||
|
.q 8 byte integer (only available if CONFIG_PHYS_64BIT=y)
|
||||||
|
.s string
|
||||||
|
======= ======================================================
|
||||||
|
|
||||||
|
value1, value2
|
||||||
|
values to compare. Numeric values are hexadecimal. If '*' is prefixed a
|
||||||
|
hexadecimal address is passed, which points to the value to be compared.
|
||||||
|
|
||||||
|
op
|
||||||
|
operator, see table
|
||||||
|
|
||||||
|
======== ======================
|
||||||
|
operator meaning
|
||||||
|
======== ======================
|
||||||
|
-lt less than
|
||||||
|
< less than
|
||||||
|
-le less or equal
|
||||||
|
<= less or equal
|
||||||
|
-eq equal
|
||||||
|
== equal
|
||||||
|
-ne not equal
|
||||||
|
!= not equal
|
||||||
|
<> not equal
|
||||||
|
-ge greater or equal
|
||||||
|
>= greater or equal
|
||||||
|
-gt greater than
|
||||||
|
> greater than
|
||||||
|
======== ======================
|
||||||
|
|
||||||
|
Examples
|
||||||
|
========
|
||||||
|
|
||||||
|
The itest command sets the result variable $? to true (0) or false (1):
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
=> itest 3 < 4; echo $?
|
||||||
|
0
|
||||||
|
=> itest 3 == 4; echo $?
|
||||||
|
1
|
||||||
|
|
||||||
|
This value can be used in the :doc:`if <if>` command:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
=> if itest 0x3002 < 0x4001; then echo true; else echo false; fi
|
||||||
|
true
|
||||||
|
|
||||||
|
Numbers will be truncated according to the postfix before comparing:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
=> if itest.b 0x3002 < 0x4001; then echo true; else echo false; fi
|
||||||
|
false
|
||||||
|
|
||||||
|
Postfix .s causes a string compare. The string '0xa1234' is alphabetically
|
||||||
|
smaller than '0xb'.
|
||||||
|
|
||||||
|
=> if itest.s 0xa1234 < 0xb; then echo true; else echo false; fi
|
||||||
|
true
|
||||||
|
|
||||||
|
A value prefixed by '*' is a pointer to the value in memory.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
=> mm 0x4000
|
||||||
|
00004000: 00000004 ?
|
||||||
|
00004004: 00000003 ? =>
|
||||||
|
=> if itest *0x4000 == 4; then echo true; else echo false; fi
|
||||||
|
true
|
||||||
|
=> if itest *0x4004 == 3; then echo true; else echo false; fi
|
||||||
|
true
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
|
The command is only available if CONFIG_CMD_ITEST=y.
|
||||||
|
|
||||||
|
Return value
|
||||||
|
------------
|
||||||
|
|
||||||
|
The return value $? is 0 (true) if the condition is true and 1 (false)
|
||||||
|
otherwise.
|
|
@ -72,6 +72,7 @@ Shell commands
|
||||||
cmd/history
|
cmd/history
|
||||||
cmd/host
|
cmd/host
|
||||||
cmd/if
|
cmd/if
|
||||||
|
cmd/itest
|
||||||
cmd/imxtract
|
cmd/imxtract
|
||||||
cmd/load
|
cmd/load
|
||||||
cmd/loadb
|
cmd/loadb
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "optee/optee_private.h"
|
#include "optee/optee_private.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The sandbox tee driver tries to emulate a generic Trusted Exectution
|
* The sandbox tee driver tries to emulate a generic Trusted Execution
|
||||||
* Environment (TEE) with the Trusted Applications (TA) OPTEE_TA_AVB and
|
* Environment (TEE) with the Trusted Applications (TA) OPTEE_TA_AVB and
|
||||||
* OPTEE_TA_RPC_TEST available.
|
* OPTEE_TA_RPC_TEST available.
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +23,7 @@ static const u32 pstorage_max = 16;
|
||||||
/**
|
/**
|
||||||
* struct ta_entry - TA entries
|
* struct ta_entry - TA entries
|
||||||
* @uuid: UUID of an emulated TA
|
* @uuid: UUID of an emulated TA
|
||||||
* @open_session Called when a session is openened to the TA
|
* @open_session Called when a session is opened to the TA
|
||||||
* @invoke_func Called when a function in the TA is to be invoked
|
* @invoke_func Called when a function in the TA is to be invoked
|
||||||
*
|
*
|
||||||
* This struct is used to register TAs in this sandbox emulation of a TEE.
|
* This struct is used to register TAs in this sandbox emulation of a TEE.
|
||||||
|
@ -140,8 +140,8 @@ static u32 pta_scp03_invoke_func(struct udevice *dev, u32 func, uint num_params,
|
||||||
provisioned = true;
|
provisioned = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Either way, we asume both operations succeeded and that
|
* Either way, we assume both operations succeeded and that
|
||||||
* the communication channel has now been stablished
|
* the communication channel has now been established
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return TEE_SUCCESS;
|
return TEE_SUCCESS;
|
||||||
|
|
Loading…
Add table
Reference in a new issue