From: Richard Weinberger <richard@sigma-star.at>
To: sahil.malhotra@nxp.com, Ye Li <ye.li@oss.nxp.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
alice.guo@nxp.com, peng.fan@nxp.com,
upstream+uboot@sigma-star.at, ye.li@nxp.com
Subject: Re: TZASC misconfiguration on i.mx8m
Date: Tue, 09 Jun 2026 08:53:25 +0200 [thread overview]
Message-ID: <4466851.5hrfCrGMcO@nailgun> (raw)
In-Reply-To: <9bcf6592-e616-4b7f-9d54-83987c6a2bbb@oss.nxp.com>
Ye Li,
On Dienstag, 9. Juni 2026 03:44 Ye Li wrote:
> > We have discussed this with iMX optee owner. The fix should be done in
> > OPTEE not u-boot.
> > 1. OPTEE uses secure memory, so it needs to re-confiure trustzone to
> > meet secure requirement not depending on SPL setting.
> > 2. SPL also supports Non-optee case.
> >
> > Best regards,
> > Ye Li
> >
> >
> > Can you please point to this discussion?
>
> It is our internal discussion not on community thread. I add Sahil to
> comment for optee. And please notice, trustzone should be enabled before
> DDR initialization. So it should be in SPL not optee. Optee can
> reconfigure trustzone setting.
But U-Boot right now harms the TZASC settings.
This is exactly why upstream OP-TEE has the following guard:
commit 443c5817de47f1bd19091b419806898070382a67
Author: Marco Felsch <m.felsch@pengutronix.de>
Date: Tue Jun 17 13:27:53 2025 +0200
drivers: imx: tzc380: add support to verify region0
There are platforms where memory aliasing can't be prevented, e.g. the
i.MX8M. If the previous running firmware configured region0, which
covers the whole AXI address space, to be accessible from secure and
non-secure world the OP-TEE core memory would be accessible via memory
aliasing.
To prevent such attacks we need to ensure that region0 is accessible
from the secure world only.
Reviewed-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Upstream A-TF also used to misconfigure region0, this got fixed by:
https://github.com/ARM-software/arm-trusted-firmware/commit/9bf148071aad597e7fe7d1080c00aeb35b67a3dd
So, why is U-Boot working *against* upstream?
Instead of using the sledgehammer and enable normal world access to the whole
region0, apply a more precise fix to make these USB masters work.
I know, with downstream IMX OP-TEE it's less of a problem, because you carry this change:
commit c09d6e9da171f8c5ee42b42ff144b320761a5f16
Author: Sahil Malhotra <sahil.malhotra@nxp.com>
Date: Mon Aug 4 20:08:59 2025 +0200
LFOPTEE-468 core: plat-imx: tzc380: update TZASC configuration
In order to prevent Memory aliasing, need to ensure that region0
is accessible from secure world only.
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
Thanks,
//richard
--
sigma star gmbh | Eduard-Bodem-Gasse 6, 6020 Innsbruck, AUT UID/VAT Nr:
ATU 66964118 | FN: 374287y
next prev parent reply other threads:[~2026-06-09 6:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 17:24 TZASC misconfiguration on i.mx8m Richard Weinberger
2026-06-05 14:52 ` Richard Weinberger
2026-06-08 1:42 ` Ye Li
2026-06-08 3:07 ` Richard Weinberger
2026-06-09 1:44 ` Ye Li
2026-06-09 6:53 ` Richard Weinberger [this message]
2026-06-09 9:56 ` Ye Li
2026-06-09 9:58 ` Richard Weinberger
2026-06-09 10:12 ` Ye Li
2026-06-09 10:15 ` Richard Weinberger
2026-06-10 7:21 ` [EXT] " Sahil Malhotra
2026-06-11 14:53 ` Fabio Estevam
2026-06-12 9:59 ` Ye Li
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=4466851.5hrfCrGMcO@nailgun \
--to=richard@sigma-star.at \
--cc=alice.guo@nxp.com \
--cc=peng.fan@nxp.com \
--cc=sahil.malhotra@nxp.com \
--cc=u-boot@lists.denx.de \
--cc=upstream+uboot@sigma-star.at \
--cc=ye.li@nxp.com \
--cc=ye.li@oss.nxp.com \
/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