From: "Alex G." <mr.nuke.me@gmail.com>
To: Patrick DELAUNAY <patrick.delaunay@foss.st.com>,
u-boot@lists.denx.de, trini@konsulko.com
Cc: sjg@chromium.org, etienne.carriere@linaro.org
Subject: Re: [PATCH v3 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE
Date: Mon, 31 May 2021 12:37:59 -0500 [thread overview]
Message-ID: <a06edc94-8d8a-9025-3865-a31f8aa3dc8a@gmail.com> (raw)
In-Reply-To: <c95586dc-5434-c6ed-3424-8ff854932205@foss.st.com>
On 5/28/21 5:22 AM, Patrick DELAUNAY wrote:
> Hi,
>
> On 4/15/21 6:48 PM, Alexandru Gagniuc wrote:
[snip]
>> + fdt_start = ofnode_get_addr_size(node, "reg", size);
>
> warning here because size is 'fdt_size_t *' not 'u32*'
>
> arch/arm/mach-stm32mp/spl.c:122:48: warning: passing argument 3 of
> ‘ofnode_get_addr_size’ from inc
>
Fixed in v4
>> +
>> + tzc_configure(tzc, optee_config);
>> + tzc_dump_config(tzc);
> Dump is always require, even for nomal boot, or only for debug cases ?
Because tzc_dump_config() uses log_info(), only prints when the
appropriate log level is enabled. This is by design, so that we don't
need extra logic here to invoke dump().
>> +
>> + dcache_disable();
>
>
> You disable cache why,
>
> it is not supported by OP-TEE ?
>
> => if it is a generic issue it should be in spl.c for case IH_OS_TEE or in
>
> spl_optee_entry() and not in board specific weak function
>
> as it done in bl31_entry for TF-A
I don't know if this can be safely generalized. stm32mp is the only
platform to enable TZC in SPL, which brings special constraints:
We're running in secure mode, and we've touched memory that will be
reserved to the normal world, for example the linux devicetree. Once we
enable TZC, we can't touch that memory anymore. This could happen later
as the CPU is evicting cache lines.
To make sure we don't hit a TZC violation as cache lines are evicted, we
both flush the dcache, and disable the dcache. Doing this another way is
not tested, and I can't guarantee that other variations will work reliably.
Alex
next prev parent reply other threads:[~2021-05-31 17:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 16:48 [PATCH v3 0/5] stm32mp: Enable OP-TEE and TZC support in SPL Alexandru Gagniuc
2021-04-15 16:48 ` [PATCH v3 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Alexandru Gagniuc
2021-04-15 16:48 ` [PATCH v3 2/5] spl: Introduce spl_board_prepare_for_optee() hook Alexandru Gagniuc
2021-04-15 16:48 ` [PATCH v3 3/5] arm: stm32mp: Implement support for TZC 400 controller Alexandru Gagniuc
2021-05-28 9:59 ` Patrick DELAUNAY
2021-05-31 17:16 ` Alex G.
2021-04-15 16:48 ` [PATCH v3 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE Alexandru Gagniuc
2021-05-28 10:22 ` Patrick DELAUNAY
2021-05-31 17:37 ` Alex G. [this message]
2021-04-15 16:48 ` [PATCH v3 5/5] ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb Alexandru Gagniuc
2021-05-28 10:26 ` Patrick DELAUNAY
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=a06edc94-8d8a-9025-3865-a31f8aa3dc8a@gmail.com \
--to=mr.nuke.me@gmail.com \
--cc=etienne.carriere@linaro.org \
--cc=patrick.delaunay@foss.st.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--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