From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] What if ATF can be part of U-Boot source, like SPL?
Date: Wed, 4 Sep 2019 19:56:44 +0200 [thread overview]
Message-ID: <7c017abf-75af-e573-b6e6-48106d402ed2@gmail.com> (raw)
In-Reply-To: <20190904183237.7bc77826@donnerap.cambridge.arm.com>
On 9/4/19 7:32 PM, Andre Przywara wrote:
[...]
>> I have been avoiding this thread but today I attended a talk on ATF
>> and ARM's approach in general. ARM seems to be moving towards an
>> approach of providing increasingly complex source code to add more
>> layers of security software to fully round out two mostly separate
>> worlds (secure and normal).
>>
>> Oddly enough Intel was also there talking about how they are breaking
>> things down into pieces and slowly releasing more things into the open
>> source world.
>>
>> I came away with the impression that the two companies are going in
>> different directions. ARM seems to be heading where Intel was and
>> Intel is heading back. This is a gross simplification of course.
>>
>> To me it seems that the following scenario might play out:
>>
>> 1. ARM releases new ATF versions as source drops that firmware
>> projects like U-Boot expected to take. In fact, not even U-Boot...this
>> is just users picking up whatever they find
>>
>> 2. ATF keeps getting more complex, adding its own drivers for serial,
>> storage, etc., duplicating and perhaps conflicting with those in
>> U-Boot
>
> A bit like U-Boot, ATF can look quite differently on the various platforms:
> - There are platforms like Arm's Juno or the fastmodel, where ATF does some loading. This is mostly for features like secure boot or secure payloads (OP-Tee). Typically we don't even use U-Boot primarily on those platforms (but EDK II instead).
> - There are platforms (low end SoCs like Allwinner, Rockchip, for instance) which don't do any loading at all, actually rely on other code (SPL?) to load ATF itself.
>
> So I don't see how this would duplicate effort or even conflict.
So why don't we put all the platform init code into U-Boot SPL, which
already has all the loading code and only load this ATF BL31 with SPL?
>> 3. Over time we end up with binary blobs on ARM that are every bit as
>> impenetrable as what Intel used to have
>
> I am not quite sure I follow how you come from 2. to 3. Was there something in the presentation (I guess OSFC?) you are referring to?
> In contrast to the x86 world the firmware is actually Open Source based, so you actually have a realistic chance to rebuild and/or verify it. If this is not true in a particular case, poke your vendor.
I thought ATF was designed to be BSD-licensed to allow vendors to take
all the open source contributions, benefit from it, but also allow the
vendors to never release their changes if they so desire.
It seems like some platforms even went down this path already and only
released blobs, hence, no security fixes etc.
>> 4. Firmware security and open-sourceness suffers, overall.
>>
>> One approach might be for ATF to split into a library which can be
>> linked into a new U-Boot phase and a driver/init bit that could be
>> used for other bootloaders, whatever they might be.
>>
>> But in the meantime, I think it makes more sense to incorporate the
>> relevant parts of ATF into U-Boot and maintain them there, only for
>> the platforms that U-Boot supports. If ATF starts using GUIDs and the
>> like, we at least have somewhere to hide :-)
>
> What are the relevant parts, exactly? Do you want to rip them out? Use git submodules?
> For reasons I detailed before, I doubt the viability of the practical aspect alone.
>
> But on top of that, I see that ATF and U-Boot address two separate areas: CPU initialisation and secure world management on one side, and a very versatile bootloader running in the non-secure world on the other. Keeping them separate allows a clean separation and lets each project focus on its core functionality.
>
> I understand that this separation is not always as clear or as well implemented on every platform, but at least we should aim at this.
Shouldn't the "secure world" management be as open as possible then ?
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2019-09-04 17:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-29 15:02 [U-Boot] What if ATF can be part of U-Boot source, like SPL? Jagan Teki
2019-06-29 16:50 ` Mark Kettenis
2019-06-29 18:38 ` Marek Vasut
2019-06-29 18:49 ` André Przywara
2019-06-29 23:03 ` Marek Vasut
2019-06-30 1:38 ` André Przywara
2019-07-02 18:32 ` Marek Vasut
2019-09-04 2:17 ` Simon Glass
2019-09-04 17:32 ` Andre Przywara
2019-09-04 17:56 ` Marek Vasut [this message]
2019-09-05 0:54 ` André Przywara
2019-09-05 12:26 ` Marek Vasut
2019-09-05 23:14 ` André Przywara
2019-06-30 11:15 ` Wolfgang Denk
2019-06-30 13:57 ` Tom Rini
2019-06-30 14:03 ` Marek Vasut
2019-06-30 14:07 ` Michael Nazzareno Trimarchi
2019-06-30 14:17 ` Tom Rini
2019-06-30 14:20 ` Marek Vasut
2019-06-30 14:29 ` Tom Rini
2019-06-30 14:50 ` Marek Vasut
2019-09-04 2:51 ` Masahiro Yamada
2019-09-04 23:10 ` Tom Rini
[not found] <20190904134501.7980e45b@donnerap.cambridge.arm.com>
2019-09-05 1:17 ` Matteo Carlini
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=7c017abf-75af-e573-b6e6-48106d402ed2@gmail.com \
--to=marek.vasut@gmail.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