From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: u-boot@lists.denx.de
Subject: Fit images and EFI_LOAD_FILE2_PROTOCOL
Date: Tue, 6 Oct 2020 15:41:43 +0300 [thread overview]
Message-ID: <20201006124143.GA236482@apalos.home> (raw)
In-Reply-To: <70e79c8d-ad3f-f08b-1527-1d3cfb87fde9@arm.com>
Hi Grant,
[...]
> > >
> > > Hi Heinrich,
> > >
> > > I've got concerns about this approach. Even though it uses the UEFI
> > > infrastructure, images deployed in this way are U-Boot specific and
> > > won't ever be applicable on EDK2 or other UEFI implementations.
> > >
> > > However there is another way to approach it which I think Francois
> > > touched on. If instead a UEFI stub was added to the FIT image, in the
> > > same way that the kernel has a UEFI stub, then the logic of decoding
> > > the
> > > FIT and choosing the correct DTB & initrd can be part of the image and
> > > it becomes applicable to any UEFI implementation. It would also address
> > >
> > > Ard's concern of loading the FIT into memory, and then copying due to
> > > the EFI_FILE_LOAD2 path. The FIT stub would already know the image is
> > > in
> > > RAM, that is is reserved correctly, and just pass the correct addresses
> > >
> > > to the kernel as part of the normal boot flow.
> > >
> > > Signing would also be taken care of because the whole FIT can be
> > > signed,
> > > and that signature would be checked when it gets loaded.
> > >
> > > Thoughts?
> > >
> >
> > The gain of a fit image in U-Boot used for calling the Linux kernel via the EFI stub vs calling the legacy entry point comes down to providing the EFI_RNG_PROTOCOL to be used for KASLR.
>
> I agree with that, but that is not my concern.
>
> My concern is that the FIT image format will only be supported by U-Boot.
> Other UEFI implementations do not implement it.
>
> On the other hand, adding a UEFI Stub to the FIT image format makes it a
> generic solution that can be used by any UEFI implementation. This would be
> separate from the linux kernel's UEFI stub, and should only deal with
> choosing the appropriate kernel/initrd/dtb from the FIT and then calling
> into the kernel's stub to actually boot the kernel.
If we are considering a cross-firmware solution for this why base it on FIT?
Wouldn't a single EFI application (that's aware of the signatures and how
to verify them) do the job? Just to inherit the work on signatures already done
in FIT?
>
> > For initrd a stub UEFI binary will work. But if you want to provide a kernel specific dtb with the same stub binary it will require a new service for device-tree fixups.
>
> Devicetree fixups indeed needs to be solved. I would propose registering a
> new protocol for fixups. If the protocol is present, then stub can call it.
> If not, then the DTB from the fit should be used unmodified.
>
> g.
So if you do this in a single EFI app, you wont need an extra protocol for it
right?
Thanks
/Ilias
next prev parent reply other threads:[~2020-10-06 12:41 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-03 8:51 Fit images and EFI_LOAD_FILE2_PROTOCOL Heinrich Schuchardt
2020-10-03 11:14 ` François Ozog
2020-10-03 11:16 ` François Ozog
2020-10-03 13:12 ` Ard Biesheuvel
2020-10-03 16:35 ` Heinrich Schuchardt
2020-10-03 16:59 ` Ard Biesheuvel
2020-10-05 6:33 ` Ilias Apalodimas
2020-10-05 14:12 ` François Ozog
2020-10-05 15:25 ` Daniel Thompson
2020-10-05 17:14 ` François Ozog
2020-10-04 23:41 ` Cristian Ciocaltea
2020-10-05 22:37 ` Grant Likely
2020-10-06 4:35 ` Heinrich Schuchardt
2020-10-06 7:20 ` Ard Biesheuvel
2020-10-06 8:00 ` François Ozog
2020-10-06 8:05 ` Ard Biesheuvel
2020-10-06 10:13 ` François Ozog
2020-10-06 10:23 ` Ard Biesheuvel
2020-10-06 9:58 ` Daniel Thompson
2020-10-06 10:38 ` Grant Likely
2020-10-06 12:04 ` François Ozog
2020-10-06 12:36 ` Heinrich Schuchardt
2020-10-06 12:43 ` Grant Likely
2020-10-06 12:52 ` Heinrich Schuchardt
2020-10-06 13:02 ` Grant Likely
2020-10-06 14:22 ` François Ozog
2020-10-06 14:46 ` Ard Biesheuvel
2020-10-06 15:08 ` François Ozog
2020-10-06 15:32 ` François Ozog
2020-10-06 17:50 ` Ard Biesheuvel
2020-10-06 13:00 ` François Ozog
2020-10-06 12:38 ` Grant Likely
2020-10-06 12:05 ` Heinrich Schuchardt
2020-10-06 12:15 ` François Ozog
2020-10-06 12:41 ` Ilias Apalodimas [this message]
2020-10-06 12:46 ` Grant Likely
2020-10-06 13:12 ` Heinrich Schuchardt
2020-10-06 14:09 ` François Ozog
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=20201006124143.GA236482@apalos.home \
--to=ilias.apalodimas@linaro.org \
--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