<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/optee, branch v2020.04</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>optee: Replace uninitialized return variable by proper one.</title>
<updated>2020-01-30T18:30:35+00:00</updated>
<author>
<name>Christoph Müllner</name>
<email>christoph.muellner@theobroma-systems.com</email>
</author>
<published>2020-01-26T22:20:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0f97e923d4921a057e1a7bbfac170cadefde5624'/>
<id>0f97e923d4921a057e1a7bbfac170cadefde5624</id>
<content type='text'>
As hinted by GCC 9, there is a return statement that returns
an uninitialized variable in optee_copy_firmware_node().
This patch addresses this.

Signed-off-by: Christoph Müllner &lt;christoph.muellner@theobroma-systems.com&gt;
Reviewed-by: Heiko Stuebner &lt;heiko.stuebner@theobroma-systems.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As hinted by GCC 9, there is a return statement that returns
an uninitialized variable in optee_copy_firmware_node().
This patch addresses this.

Signed-off-by: Christoph Müllner &lt;christoph.muellner@theobroma-systems.com&gt;
Reviewed-by: Heiko Stuebner &lt;heiko.stuebner@theobroma-systems.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Move the image globals into image.h</title>
<updated>2020-01-17T19:02:35+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-12-28T17:45:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8e8ccfe1aa1a3ea0cb88b4438c7a687fcf8632a1'/>
<id>8e8ccfe1aa1a3ea0cb88b4438c7a687fcf8632a1</id>
<content type='text'>
These three globals relate to image handling. Move them to the image
header file.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These three globals relate to image handling. Move them to the image
header file.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>image: fdt: copy possible optee nodes to a loaded devicetree</title>
<updated>2019-11-14T13:09:34+00:00</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko.stuebner@theobroma-systems.com</email>
</author>
<published>2019-10-23T14:46:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6ccb05eae01b660b0585accf338302af1069f419'/>
<id>6ccb05eae01b660b0585accf338302af1069f419</id>
<content type='text'>
The loading convention for optee or any other tee on arm64 is as bl32
parameter to the trusted-firmware. So TF-A gets invoked with the TEE as
bl32 and main u-boot as bl33. Once it has done its startup TF-A jumps
into the bl32 for the TEE startup, returns to TF-A and then jumps to bl33.

All of them get passed a devicetree as parameter and all components often
get loaded from a FIT image.

OP-TEE will create additional nodes in that devicetree namely a firmware
node and possibly multiple reserved-memory nodes.

While this devicetree is used in main u-boot, in most cases it won't be
the one passed to the actual kernel. Instead most boot commands will load
a new devicetree from somewhere like mass storage of the network, so if
that happens u-boot should transfer the optee nodes to that new devicetree.

To make that happen introduce optee_copy_fdt_nodes() called from the dt
setup function in image-fdt which after checking for the optee presence
in the u-boot dt will make sure a optee node is present in the kernel dt
and transfer any reserved-memory regions it can find.

Signed-off-by: Heiko Stuebner &lt;heiko.stuebner@theobroma-systems.com&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The loading convention for optee or any other tee on arm64 is as bl32
parameter to the trusted-firmware. So TF-A gets invoked with the TEE as
bl32 and main u-boot as bl33. Once it has done its startup TF-A jumps
into the bl32 for the TEE startup, returns to TF-A and then jumps to bl33.

All of them get passed a devicetree as parameter and all components often
get loaded from a FIT image.

OP-TEE will create additional nodes in that devicetree namely a firmware
node and possibly multiple reserved-memory nodes.

While this devicetree is used in main u-boot, in most cases it won't be
the one passed to the actual kernel. Instead most boot commands will load
a new devicetree from somewhere like mass storage of the network, so if
that happens u-boot should transfer the optee nodes to that new devicetree.

To make that happen introduce optee_copy_fdt_nodes() called from the dt
setup function in image-fdt which after checking for the optee presence
in the u-boot dt will make sure a optee node is present in the kernel dt
and transfer any reserved-memory regions it can find.

Signed-off-by: Heiko Stuebner &lt;heiko.stuebner@theobroma-systems.com&gt;
Reviewed-by: Jens Wiklander &lt;jens.wiklander@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>optee: Make TZDRAM config options contingent on CONFIG_OPTEE</title>
<updated>2019-07-19T13:12:07+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2019-05-04T00:08:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7e7cc90e33f556f047b469e48a41fc5c130df2d8'/>
<id>7e7cc90e33f556f047b469e48a41fc5c130df2d8</id>
<content type='text'>
Commit c7b3a7ee5351 ("optee: adjust dependencies and default values for
dram") makes the TZDRAM defines for OPTEE show up for all configs as a
side-effect. While not harmful its not what we really want.

This patch makes the following defines contingent on CONFIG_OPTEE=y

CONFIG_OPTEE_TZDRAM_BASE
CONFIG_OPTEE_TZDRAM_SIZE

Rightly, if you don't have CONFIG_OPTEE=y you don't care about the above
two defines.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Acked-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit c7b3a7ee5351 ("optee: adjust dependencies and default values for
dram") makes the TZDRAM defines for OPTEE show up for all configs as a
side-effect. While not harmful its not what we really want.

This patch makes the following defines contingent on CONFIG_OPTEE=y

CONFIG_OPTEE_TZDRAM_BASE
CONFIG_OPTEE_TZDRAM_SIZE

Rightly, if you don't have CONFIG_OPTEE=y you don't care about the above
two defines.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Acked-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>optee: adjust dependencies and default values for dram</title>
<updated>2018-10-22T12:37:28+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2018-09-05T10:56:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c7b3a7ee53512380a80a029e8a993ff470ff5b61'/>
<id>c7b3a7ee53512380a80a029e8a993ff470ff5b61</id>
<content type='text'>
We may have, the not yet considered, scenario where OPTEE is loaded before
u-boot and *not* by u-boot, e.g, the boot flow using the ARM Trusted
Firmware (ATF), where in the 32bit flow is:
BootRom-&gt;ATF(BL2)-&gt;Optee(BL32)-&gt;u-boot(BL33)

In this case we need still to reserve the memory used by optee, to avoid
for example to realocate ourself to the same address at the end of DRAM.
So, we change here the dependencies on the OPTEE lib and we set the default
size and base of TZRAM to zero.

Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Cc: Ryan Harkin &lt;ryan.harkin@linaro.org&gt;
Cc: u-boot@lists.denx.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We may have, the not yet considered, scenario where OPTEE is loaded before
u-boot and *not* by u-boot, e.g, the boot flow using the ARM Trusted
Firmware (ATF), where in the 32bit flow is:
BootRom-&gt;ATF(BL2)-&gt;Optee(BL32)-&gt;u-boot(BL33)

In this case we need still to reserve the memory used by optee, to avoid
for example to realocate ourself to the same address at the end of DRAM.
So, we change here the dependencies on the OPTEE lib and we set the default
size and base of TZRAM to zero.

Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Cc: Ryan Harkin &lt;ryan.harkin@linaro.org&gt;
Cc: u-boot@lists.denx.de
</pre>
</div>
</content>
</entry>
<entry>
<title>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-06T21:58:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bootm: optee: Add a bootm command for type IH_OS_TEE</title>
<updated>2018-03-19T20:14:25+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2018-03-13T16:50:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c225e7cf54fcad44902488f0d07bf362a477adf8'/>
<id>c225e7cf54fcad44902488f0d07bf362a477adf8</id>
<content type='text'>
This patch makes it possible to verify the contents and location of an
OPTEE image in DRAM prior to handing off control to that image. If image
verification fails we won't try to boot any further.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Suggested-by: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Harinarayan Bhatta &lt;harinarayan@ti.com&gt;
Cc: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Cc: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes it possible to verify the contents and location of an
OPTEE image in DRAM prior to handing off control to that image. If image
verification fails we won't try to boot any further.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Suggested-by: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Harinarayan Bhatta &lt;harinarayan@ti.com&gt;
Cc: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Cc: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>optee: Add error printout</title>
<updated>2018-03-19T20:14:25+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2018-03-13T16:50:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6ffc4200457e0616d51f3a7219bbd486d564a4e6'/>
<id>6ffc4200457e0616d51f3a7219bbd486d564a4e6</id>
<content type='text'>
When encountering an error in OPTEE verification print out various details
of the OPTEE header to aid in further debugging of encountered errors.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Harinarayan Bhatta &lt;harinarayan@ti.com&gt;
Cc: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Cc: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Tested-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When encountering an error in OPTEE verification print out various details
of the OPTEE header to aid in further debugging of encountered errors.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Harinarayan Bhatta &lt;harinarayan@ti.com&gt;
Cc: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Cc: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Tested-by: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>optee: Add optee_verify_bootm_image()</title>
<updated>2018-03-19T20:14:24+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2018-03-13T16:50:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c5a6e8bd00cc7257541a904682206bdc0be2bab4'/>
<id>c5a6e8bd00cc7257541a904682206bdc0be2bab4</id>
<content type='text'>
This patch adds optee_verify_bootm_image() which will be subsequently used
to verify the parameters encoded in the OPTEE header match the memory
allocated to the OPTEE region, OPTEE header magic and version prior to
handing off control to the OPTEE image.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Harinarayan Bhatta &lt;harinarayan@ti.com&gt;
Cc: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Cc: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds optee_verify_bootm_image() which will be subsequently used
to verify the parameters encoded in the OPTEE header match the memory
allocated to the OPTEE region, OPTEE header magic and version prior to
handing off control to the OPTEE image.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Cc: Harinarayan Bhatta &lt;harinarayan@ti.com&gt;
Cc: Andrew F. Davis &lt;afd@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Kever Yang &lt;kever.yang@rock-chips.com&gt;
Cc: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>optee: Add CONFIG_OPTEE_LOAD_ADDR</title>
<updated>2018-03-19T20:14:24+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>bryan.odonoghue@linaro.org</email>
</author>
<published>2018-03-13T16:50:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f25006b96e9f6b9b8688ec8e4bc8a87dc1f1479d'/>
<id>f25006b96e9f6b9b8688ec8e4bc8a87dc1f1479d</id>
<content type='text'>
CONFIG_OPTEE_LOAD_ADDR is used to tell u-boot where to load the OPTEE
binary into memory prior to handing off control to OPTEE.

We need to pull this value out of u-boot in order to produce an IMX IVT/CSF
signed pair for the purposes of secure boot. The best way to do that is to
have CONFIG_OPTEE_LOAD_ADDR appear in u-boot.cfg.

Adding new CONFIG entires to u-boot should be kconfig driven so this patch
does just that.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Reviewed-by: Ryan Harkin &lt;ryan.harkin@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CONFIG_OPTEE_LOAD_ADDR is used to tell u-boot where to load the OPTEE
binary into memory prior to handing off control to OPTEE.

We need to pull this value out of u-boot in order to produce an IMX IVT/CSF
signed pair for the purposes of secure boot. The best way to do that is to
have CONFIG_OPTEE_LOAD_ADDR appear in u-boot.cfg.

Adding new CONFIG entires to u-boot should be kconfig driven so this patch
does just that.

Signed-off-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Reviewed-by: Ryan Harkin &lt;ryan.harkin@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
