From: Tom Rini <trini@konsulko.com>
To: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Cc: u-boot@lists.denx.de, patrick.delaunay@foss.st.com,
etienne.carriere@linaro.org, sbabic@denx.de, festevam@gmail.com
Subject: Re: [PATCH 1/4] lib: optee: Avoid CONFIG_TZDRAM_* in optee_verify_bootm_image()
Date: Tue, 5 Oct 2021 18:01:51 -0400 [thread overview]
Message-ID: <20211005220151.GC31748@bill-the-cat> (raw)
In-Reply-To: <20210907170709.2684890-2-mr.nuke.me@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]
On Tue, Sep 07, 2021 at 12:07:06PM -0500, Alexandru Gagniuc wrote:
> The configs TZDRAM_BASE and TZDRAM_SIZE are expected to describe the
> memory allocated to the OPTEE region. according to according to commit
> c5a6e8bd00cc ("optee: Add optee_verify_bootm_image()"). The TZDRAM is
> with some limitations, described by "/reserved-memory" nodes in the
> devicetree.
>
> Consequently TZDRAM_BASE and TZDRAM_SIZE can point to imaginary
> regions which have nothing to do with actual DRAM. They are not used
> to configure the hardware or set up the Trust Zone Controller (TZC)
> for OP-TEE -- the devicetree values are used instead.
>
> When a valid OP-TEE image does not fall within the region described by
> these configs, u-boot will refuse to load it. In fact, it mostly
> serves to cause "bootm" to reject perfectly good OP-TEE images.
>
> Ironically, someone has to correctly configure the devicetree for
> TZDRAM, then go back and enter the same information in Kconfig for
> "bootm". To remedy this, do not use TZDRAM_BASE and TZDRAM_SIZE in the
> verification of OPTEE images.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2021-10-05 22:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 17:07 [PATCH 0/4] Repeal and replace TZDRAM_ related config options Alexandru Gagniuc
2021-09-07 17:07 ` [PATCH 1/4] lib: optee: Avoid CONFIG_TZDRAM_* in optee_verify_bootm_image() Alexandru Gagniuc
2021-10-05 22:01 ` Tom Rini [this message]
2021-09-07 17:07 ` [PATCH 2/4] lib: optee: Remove CONFIG_OPTEE_TZDRAM_BASE Alexandru Gagniuc
2021-10-05 22:01 ` Tom Rini
2021-09-07 17:07 ` [PATCH 3/4] lib: optee: Remove CONFIG_OPTEE_LOAD_ADDR Alexandru Gagniuc
2021-10-05 22:01 ` Tom Rini
2021-09-07 17:07 ` [PATCH 4/4] arm: imx: mx7: Move CONFIG_OPTEE_TZDRAM_SIZE from lib/optee Alexandru Gagniuc
2021-10-05 22:02 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211005220151.GC31748@bill-the-cat \
--to=trini@konsulko.com \
--cc=etienne.carriere@linaro.org \
--cc=festevam@gmail.com \
--cc=mr.nuke.me@gmail.com \
--cc=patrick.delaunay@foss.st.com \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox