From: Marek Vasut <marex@nabladev.com>
To: Yannic Moog <Y.Moog@phytec.de>,
"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
Fabio Estevam <festevam@gmail.com>, Peng Fan <peng.fan@nxp.com>,
Simon Glass <sjg@chromium.org>,
Stefano Babic <sbabic@nabladev.com>,
Tom Rini <trini@konsulko.com>, Ye Li <ye.li@nxp.com>
Subject: Re: [PATCH] arm64: dts: imx8m: Reinstate TEE ifdeffery
Date: Sat, 4 Jul 2026 22:13:04 +0200 [thread overview]
Message-ID: <95b68d7f-e0e6-46b2-af35-8da68c2a9b6a@nabladev.com> (raw)
In-Reply-To: <5147fb9ef450d4a6963b57dbfdd6ee03eb2ae29a.camel@phytec.de>
On 7/3/26 8:16 AM, Yannic Moog wrote:
Hello Yannic,
[...]
>>> is not accurate. You were able to package OP-TEE without needing to enable support in U-Boot.
>>> And
>>> afaik this is a perfectly valid use-case.
>>
>> When you include optee-os in the U-Boot fitImage, what do you do with
>> that optee-os which U-Boot does not support ? Details please ?
>
> Sure, sorry. OS can/will use it. There is no requirement, that I know, of any bootloader
> interfacing with OP-TEE for proper functionality and its purpose is to work with Linux kernel.
At minimum, if CONFIG_OPTEE is not enabled, U-Boot won't execute
optee_copy_fdt_nodes() and won't transfer any optee-os firmware and
reserved-memory DT nodes to the Linux DT when starting the kernel, so
Linux DT will be buggy and Linux may possibly misbehave.
> I guess the only job bootloader needs to do is load it into memory. I don't know details about
> specific uses within the security context and if there are any that require bootloader support.
If in your use case, U-Boot is supposed to only load optee-os into
memory , why not load it from U-Boot command line or as part of fitImage
when booting Linux kernel ?
It seems in your use case, optee-os does not have to be part of the
bootloader image at all ?
>>> With this change you can no longer do that, so this change is a regression.
>>>
>>> About the warning message. I understand that you find it confusing; binman is designed so that
>>> it
>>> emits a warning when an optional blob is not found.
>>
>> Please see above.
>>
>>> I prefer that approach to no message at all. You may want to package OP-TEE (e.g. you have an
>>> tf-a
>>> blob which jumps to OP-TEE addr) and being alerted to a possible mistake is important; Let's
>>> say
>>> tee path was incorrect during build.
>>
>> Is this some sort of a board-specific configuration ?
>
> kind of. We have tee path set in <soc>-u-boot.dtsi: filename = "tee.bin";
>
> Could happen that TEE=teee.bin is set or file is named tee-raw.bin and then it helps to get a
> warning that binman was not able to package the blob.
>
>>
>> Why does U-Boot not enable OPTEE-OS support in this case ?
>
> No need to. Maybe to conserve space, or by principle only enable the configs that are actually
> needed? I believe PHYTEC boards used to do that before KASLR support.
This does not seem correct, please see above.
At this point, I would suggest that if you want to retain this kind of
configuration for your hardware, it should be moved into board specific
DT, it should not be part of the common DTs.
>>> Also, keeping optional when using if defs is not a good idea. Binman will still build you an
>>> image
>>> when no OP-TEE blob is present, but should not since you enabled OPTEE configs. If you enable
>>> OPTEE, you should have an OP-TEE blob packaged.
>>> We could add ifndef OPTEE around the optional property.
>>
>> The optional keyword is actually kept in this case, it is not a full revert.
>>
>> You did however miss one vital point -- the tee node is part of the
>> U-boot fitImage, even if the tee.bin binary is not present and OPTEE
>> support in U-Boot is disabled. Binman prints a confusing message, and
>> generates a bogus empty tee {} node in the fitImage. That is incorrect.
>
> Yes, forgot to address that. I don't think it is confusing, at least content wise. Visually, I can
> see how that is confusing. I want to neither agree nor disagree on the correctness part because I
> don't really know the fitImage spec. Having the tee node be part of the fitImage is a design
> choice, all optional blobs behave that way from my understanding.
It is a broken node introduced by commit b57ed147939c ("dts:
imx8m{m,n,p,q}: Make optee packaging optional") , it is not supposed to
be part of the fitImage unless optee-os is bundled into the fitImage.
> I guess it means that there is a bug in binman if you say having empty tee node is incorrect.
> And so it should be fixed in binman itself imo, not here for imx8.
No, this is not a bug in binman, please see above.
next prev parent reply other threads:[~2026-07-04 21:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 16:08 [PATCH] arm64: dts: imx8m: Reinstate TEE ifdeffery Marek Vasut
2026-07-01 7:33 ` Peng Fan
2026-07-02 7:04 ` Yannic Moog
2026-07-02 22:25 ` Marek Vasut
2026-07-03 6:16 ` Yannic Moog
2026-07-04 20:13 ` Marek Vasut [this message]
2026-07-06 12:36 ` Yannic Moog
2026-07-06 22:36 ` Marek Vasut
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=95b68d7f-e0e6-46b2-af35-8da68c2a9b6a@nabladev.com \
--to=marex@nabladev.com \
--cc=Y.Moog@phytec.de \
--cc=festevam@gmail.com \
--cc=peng.fan@nxp.com \
--cc=sbabic@nabladev.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=ye.li@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.