<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/tee.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>Correct SPL use of TEE</title>
<updated>2023-02-10T12:41:40+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-02-05T22:44:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d84855fe82d1725497773b8048817ae5788e1442'/>
<id>d84855fe82d1725497773b8048817ae5788e1442</id>
<content type='text'>
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_TEE defined in Kconfig

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts 1 usage of this option to the non-SPL form, since there is
no SPL_TEE defined in Kconfig

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>efi_loader: Don't limit the StMM buffer size explicitly</title>
<updated>2021-12-31T05:44:29+00:00</updated>
<author>
<name>Ilias Apalodimas</name>
<email>apalos@gmail.com</email>
</author>
<published>2021-12-24T08:08:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2707610eb7d3068dbd131401dcde65a57ddc0018'/>
<id>2707610eb7d3068dbd131401dcde65a57ddc0018</id>
<content type='text'>
Currently we allow and explicitly check a single shared page with
StandAloneMM.  This is dictated by OP-TEE which runs the application.
However there's no way for us dynamically discover the number of pages we
are allowed to use.  Since writing big EFI signature list variable
requires more than a page, OP-TEE has bumped the number of shared pages to
four.

Let's remove our explicit check and allow the request to reach OP-TEE even
if it's bigger than what it supports.  There's no need to sanitize the
number of pages internally.  OP-TEE will fail if we try to write more
than it's allowed. The error will just trigger later on,  during the
StMM access.

While at it add an error message to help users figure out what failed.

Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Tested-by: Ying-Chun Liu (PaulLiu) &lt;paul.liu@linaro.org&gt;

Signed-off-by: Ilias Apalodimas &lt;apalos@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we allow and explicitly check a single shared page with
StandAloneMM.  This is dictated by OP-TEE which runs the application.
However there's no way for us dynamically discover the number of pages we
are allowed to use.  Since writing big EFI signature list variable
requires more than a page, OP-TEE has bumped the number of shared pages to
four.

Let's remove our explicit check and allow the request to reach OP-TEE even
if it's bigger than what it supports.  There's no need to sanitize the
number of pages internally.  OP-TEE will fail if we try to write more
than it's allowed. The error will just trigger later on,  during the
StMM access.

While at it add an error message to help users figure out what failed.

Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Tested-by: Ying-Chun Liu (PaulLiu) &lt;paul.liu@linaro.org&gt;

Signed-off-by: Ilias Apalodimas &lt;apalos@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: optee: define TEE error code TEE_ERROR_SHORT_BUFFER</title>
<updated>2021-11-23T18:53:03+00:00</updated>
<author>
<name>Etienne Carriere</name>
<email>etienne.carriere@linaro.org</email>
</author>
<published>2021-11-09T16:08:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1442e9f33070c962e91eafdc4b591331b17b5588'/>
<id>1442e9f33070c962e91eafdc4b591331b17b5588</id>
<content type='text'>
Adds TEE_ERROR_SHORT_BUFFER as TEE error code. This error code is
commonly used by TEEs to inform caller that the buffer(s) it provided
is too small for the desired operation.

Cc: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Signed-off-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds TEE_ERROR_SHORT_BUFFER as TEE error code. This error code is
commonly used by TEEs to inform caller that the buffer(s) it provided
is too small for the desired operation.

Cc: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Signed-off-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: define session login identifiers</title>
<updated>2021-11-23T18:53:03+00:00</updated>
<author>
<name>Etienne Carriere</name>
<email>etienne.carriere@linaro.org</email>
</author>
<published>2021-11-09T16:08:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1662ed0c1a464b39ff5b303950c034a352054114'/>
<id>1662ed0c1a464b39ff5b303950c034a352054114</id>
<content type='text'>
Define identifiers for clnt_login field in struct tee_open_session_arg
based in GlobalPlatform Device TEE IDs and on the REE_KERNEL identifier
extension from OP-TEE OS.

Cc: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Signed-off-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Define identifiers for clnt_login field in struct tee_open_session_arg
based in GlobalPlatform Device TEE IDs and on the REE_KERNEL identifier
extension from OP-TEE OS.

Cc: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Signed-off-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: add a stub for tee_find_device</title>
<updated>2021-10-05T12:44:48+00:00</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-09-02T09:56:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4f53ac2adbc0f4d3bfebee1b414870e228469989'/>
<id>4f53ac2adbc0f4d3bfebee1b414870e228469989</id>
<content type='text'>
Add stub for tee_find_device function when CONFIG_TEE is not activated
to simplify the caller code.

This patch allows to remove the CONFIG_IS_ENABLED(OPTEE) tests
for stm32 platform.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Acked-by: Etienne Carriere &lt;etienne.carriere@inaro.org&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add stub for tee_find_device function when CONFIG_TEE is not activated
to simplify the caller code.

This patch allows to remove the CONFIG_IS_ENABLED(OPTEE) tests
for stm32 platform.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Acked-by: Etienne Carriere &lt;etienne.carriere@inaro.org&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: optee: sync cache on pre-reloc OP-TEE invocation</title>
<updated>2021-07-23T11:13:25+00:00</updated>
<author>
<name>Etienne Carriere</name>
<email>etienne.carriere@linaro.org</email>
</author>
<published>2021-05-19T14:27:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9e6da34c72274578be6f86ba7b7aa7849a624315'/>
<id>9e6da34c72274578be6f86ba7b7aa7849a624315</id>
<content type='text'>
This change ensures both U-Boot and OP-TEE see the same content
from shared memory when OP-TEE is invoked prior U-Boot relocation.

This change is required since U-Boot may execute with data cache off
while OP-TEE always enables cache on memory shared with U-Boot.

Signed-off-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change ensures both U-Boot and OP-TEE see the same content
from shared memory when OP-TEE is invoked prior U-Boot relocation.

This change is required since U-Boot may execute with data cache off
while OP-TEE always enables cache on memory shared with U-Boot.

Signed-off-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Drop asm/global_data.h from common header</title>
<updated>2021-02-02T20:33:42+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-10-31T03:38:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=401d1c4f5d2d29c4bc4beaec95402ca23eb63295'/>
<id>401d1c4f5d2d29c4bc4beaec95402ca23eb63295</id>
<content type='text'>
Move this out of the common header and include it only where needed.  In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly.   Finally, we have a few
cases where we did not need to include &lt;asm/global_data.h&gt; at all, so
remove that include.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move this out of the common header and include it only where needed.  In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly.   Finally, we have a few
cases where we did not need to include &lt;asm/global_data.h&gt; at all, so
remove that include.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Drop linux/bitops.h from common header</title>
<updated>2020-05-19T01:19:23+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:40:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cd93d625fd751d55c729c78b10f82109d56a5f1d'/>
<id>cd93d625fd751d55c729c78b10f82109d56a5f1d</id>
<content type='text'>
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>avb: add support for named persistent values</title>
<updated>2019-04-26T22:58:22+00:00</updated>
<author>
<name>Igor Opaniuk</name>
<email>igor.opaniuk@gmail.com</email>
</author>
<published>2019-04-09T13:38:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fc1fe01b08cedd77a194bb82fa81af4fe1e39031'/>
<id>fc1fe01b08cedd77a194bb82fa81af4fe1e39031</id>
<content type='text'>
AVB 2.0 spec. revision 1.1 introduces support for named persistent values
that must be tamper evident and allows AVB to store arbitrary key-value
pairs [1].

Introduce implementation of two additional AVB operations
read_persistent_value()/write_persistent_value() for retrieving/storing
named persistent values.

Correspondent pull request in the OP-TEE OS project repo [2].

[1]: https://android.googlesource.com/platform/external/avb/+/android-9.0.0_r22
[2]: https://github.com/OP-TEE/optee_os/pull/2699

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AVB 2.0 spec. revision 1.1 introduces support for named persistent values
that must be tamper evident and allows AVB to store arbitrary key-value
pairs [1].

Introduce implementation of two additional AVB operations
read_persistent_value()/write_persistent_value() for retrieving/storing
named persistent values.

Correspondent pull request in the OP-TEE OS project repo [2].

[1]: https://android.googlesource.com/platform/external/avb/+/android-9.0.0_r22
[2]: https://github.com/OP-TEE/optee_os/pull/2699

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tee: change return code for REE FS supplicant cmd</title>
<updated>2018-12-15T16:49:19+00:00</updated>
<author>
<name>Igor Opaniuk</name>
<email>igor.opaniuk@linaro.org</email>
</author>
<published>2018-12-04T12:37:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8b1312662b3b1748c3d5f8a30bc6f9ca72879c7a'/>
<id>8b1312662b3b1748c3d5f8a30bc6f9ca72879c7a</id>
<content type='text'>
If OP-TEE core is compiled with support of REE FS and RPMB
at the same time (CFG_RPMB_FS ?= y; CFG_RPMB_FS ?= y), and persistent
storage API is used with TEE_STORAGE_PRIVATE storage id, it will
lead to TA panic.

E/TC:? 0 TA panicked with code 0xffff0009
.....
E/TC:? 0 Call stack:
E/TC:? 0  0x000000004002f2f8 TEE_OpenPersistentObject at
lib/libutee/tee_api_objects.c:422

In this particular case TEE_ERROR_STORAGE_NOT_AVAILABLE is more suitable
than TEE_ERROR_NOT_IMPLEMENTED, as it provides to a TA a possibility
to handle this error code [1].

&gt;From GPD TEE Internal Core specification [2]:
TEE_ERROR_STORAGE_NOT_AVAILABLE - if the persistent object is stored in a
storage area which is currently inaccessible. It may be associated with
the device but unplugged, busy, or inaccessible for some other reason.

[1]: https://github.com/OP-TEE/optee_os/blob/94db01ef448d1e552161c2d861d57a5f8bda0cc0/lib/libutee/tee_api_objects.c#L419
[2]: https://globalplatform.org/wp-content/uploads/2018/06/GPD_TEE_Internal_Core_API_Specification_v1.1.2.50_PublicReview.pdf

Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@linaro.org&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If OP-TEE core is compiled with support of REE FS and RPMB
at the same time (CFG_RPMB_FS ?= y; CFG_RPMB_FS ?= y), and persistent
storage API is used with TEE_STORAGE_PRIVATE storage id, it will
lead to TA panic.

E/TC:? 0 TA panicked with code 0xffff0009
.....
E/TC:? 0 Call stack:
E/TC:? 0  0x000000004002f2f8 TEE_OpenPersistentObject at
lib/libutee/tee_api_objects.c:422

In this particular case TEE_ERROR_STORAGE_NOT_AVAILABLE is more suitable
than TEE_ERROR_NOT_IMPLEMENTED, as it provides to a TA a possibility
to handle this error code [1].

&gt;From GPD TEE Internal Core specification [2]:
TEE_ERROR_STORAGE_NOT_AVAILABLE - if the persistent object is stored in a
storage area which is currently inaccessible. It may be associated with
the device but unplugged, busy, or inaccessible for some other reason.

[1]: https://github.com/OP-TEE/optee_os/blob/94db01ef448d1e552161c2d861d57a5f8bda0cc0/lib/libutee/tee_api_objects.c#L419
[2]: https://globalplatform.org/wp-content/uploads/2018/06/GPD_TEE_Internal_Core_API_Specification_v1.1.2.50_PublicReview.pdf

Signed-off-by: Igor Opaniuk &lt;igor.opaniuk@linaro.org&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
