Re: [PATCH v1 17/19] ARM: tegra: dt-setup: convert TrustZone remove into config

Svyatoslav Ryhel clamor95 at gmail.com
Wed Aug 23 17:11:18 CEST 2023



23 серпня 2023 р. 17:54:21 GMT+03:00, Simon Glass <sjg at google.com> написав(-ла):
>Hi,
>
>On Wed, 23 Aug 2023 at 05:47, Svyatoslav Ryhel <clamor95 at gmail.com> wrote:
>>
>>
>>
>> 23 серпня 2023 р. 14:17:37 GMT+03:00, Thierry Reding <thierry.reding at gmail.com> написав(-ла):
>> >On Tue, Aug 22, 2023 at 02:22:15PM +0300, Svyatoslav Ryhel wrote:
>> >> Remove of TrustZone nodes is required by many product devices
>> >> which require repetable calls of same function from device board.
>> >> To simplify this, TZ remove is converted into Kconfig option.
>> >>
>> >> Signed-off-by: Svyatoslav Ryhel <clamor95 at gmail.com>
>> >> ---
>> >>  arch/arm/mach-tegra/Kconfig    | 14 ++++++++++++++
>> >>  arch/arm/mach-tegra/dt-setup.c |  7 +++++++
>> >>  2 files changed, 21 insertions(+)
>> >
>> >I kind of preferred the original because it's very explicit. There's
>> >also no big advantage in consolidating this because the code is unlikely
>> >to ever require changing (the libfdt API is quite stable and these nodes
>> >are all hard-coded anyway). This new variant put non-generic code (it
>> >requires a Kconfig option after all) into a generic place, so it seems a
>> >bit backwards.
>>
>> So you say that I have to add same function to boards over and over for all devices I plan to mainline? Unneeded code duplication in action.
>>
>> List of devices which need this:
>> - transformers t30
>> - transformers t114
>> - grouper
>> - lg x3
>> - endeavoru
>> - tegratab
>> - wexler qc750 and basically ALL t30 and t114
>>
>> Ok, fine. Dropping and moving on.
>
>Where is the binding for this node? I have never heard of it.

This is manipulation of linux kernel device tree. Vendor bootloader can establish trustzone while u-boot cannot since vendors do not provide trust OS image. To have a compromise linux trees have trustzone set which allows them to boot on vendor bootloaders, while u-boot removes it before linux kernel boot allowing the same tree to boot on u-boot as well. Without removing those nodes linux kernel will just stuck.

>Regards,
>Simon


More information about the U-Boot mailing list