From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: u-boot@lists.denx.de
Subject: [PATCH 2/6] efi_loader: Add device path related functions for initrd via Boot####
Date: Fri, 12 Mar 2021 07:19:29 +0200 [thread overview]
Message-ID: <YEr54SUfM1CcQ9aj@apalos.home> (raw)
In-Reply-To: <20210312050256.GD15112@laputa>
> > > > > >
[...]
> > > > > > which will create:
> > > > > > kernel path,end(0xff),
> > > > > > VenMedia(), end(0x01),
> > > > > > initrd1, end(0x01),
> > > > > > initrd2, end(0xff)
> > > > >
> > > > > What is the difference between end(0xff) and end(0x01)?
> > > > >
> > > >
> > > > 0xff is a subtype of 'end the entire device path', while 0x01 is an 'end of
> > > > instance of a device path and start a new device path'
>
> If I correctly remember, you had some discussions about this point
> that UEFI specification is ambiguous here. Right?
Yea, just by reading it wasn't clear if the delimiter between FilePathList[]
array elements was supposed to be 0xff or 0x01.
We finally figured out the spec means 0xff though, so that's (hopefully) clear
now.
>
[...]
> > > > FilePathList[0] -> kernel
> > > > FilePathList[1] -> initrd1 - initrdn
> > > > FilePathList[2] -> dtb1 - dtbn
> > > >
> > > > Vs
> > > >
> > > > FilePathList[0] -> kernel
> > > > FilePathList[1] -> initrd1
> > > > FilePathList[2] -> initrd2
> > > > FilePathList[3] -> dtb1
> > > > FilePathList[n] -> initrdn
> > > > FilePathList[n+1] -> dtb2
> > >
> > > What is the semantics?
> > > Which do you want to do?
> > > a) boot one of combinations:
> > > 1.kernel+initrd1+dtb1, or
> > > 2.kernel+initrd2+dtb2
> > > b) boot
> > > kernel + (initrd1 + initrd2) + (dtb1 + dtb2)
> > >
> > > I assume you meant (a).
> > > In that case, how can you specify (a-1) or (a-2) at boot time?
> > >
> > > Is there any clear description about that?
> > > (I"m simply asking here.)
> >
> > it's b)
>
> OK.
>
> > if you want different combinations of kernel/initrds (as described in a) you
> > can add another Boot#### variable.
>
> Indeed.
>
> > So let's assume you got three boot options
> > Boot0000, Boot0001 and Boot0002
> >
> > Boot0000 efi_load_options: kernel1 + (initrd1 + initrd2) + (dtb1 + dtb2).
> > The bootloader will concat initrd1+initrd2 when the kernel requests it.
> > Similar behavior can be coded for dtb before installing the table.
>
> My understanding is that none of existing boot loaders has not yet
> supported such a concatenation (of either initrd or dtb) right now.
> Do you (or linux's efistub?) intend to add a new feature?
For u-boot we intend to add it in the future. I just wanted to keep the
initial patchset simpler, since 99.9% of the use cases are for a single
initrd.
The efistub doesn't have to add anything to support this, that's the whole
point of trying to standardize this.
Since there's some confusion around let me try and explain that here as well.
The EFI stub does two things. It searches for the protocol with a specific
DP (which includes a unique GUID). The DP our case is <VenMedia for initrd>/<end node>.
Since locate protocol will strip the first part, the stub now calls LoadFile2
protocol with a device end node and a kernel provided buffer (and there's a
mechanism to discover the size).
It's pretty much tells the bootloader 'gimme my initrd'. So it's entirely up
to the bootloader to select a mechanism for discovering were those initrds
are and concatenate them
Cheers
/Ilias
>
> -Takahiro Akashi
>
>
> > Boot0001: kernel1 + initrd1 + dtb1
> > Load a kernel with a single initrd and dtb.
> >
> > Boot0002: kernel2 + initrd2 + dtb2
> > ditto.
> >
> > Hope that's clear now
> >
> > Cheers
> > /Ilias
> >
> >
> > >
> > > -Takahiro Akashi
> > >
> > > >
> > > >
> > > > >
> > > > > -Takahiro Akashi
> > > > >
> > > > > > I know I originally proposed the one you have, but it seemed cleaner adding
> > > > > > an extra instance between VenMedia and the first initrd.
> > > > > >
> > > > > > >
> > > > > > > Please, document the structure.
> > > > > > >
> > > > > >
> > > > > > Sure
> > > > > >
> > > > > > > Best regards
> > > > > > >
> > > > > > > Heinrich
> > > > > >
> > > > > > Thanks
> > > > > > /Ilias
> > > >
> > > > [1] https://lists.linaro.org/pipermail/boot-architecture/2021-February/001686.html
> > > >
> > > > Cheers
> > > > /Ilias
next prev parent reply other threads:[~2021-03-12 5:19 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 22:22 [PATCH 1/6] efi_selftest: Remove loadfile2 for initrd selftests Ilias Apalodimas
2021-03-05 22:22 ` [PATCH 2/6] efi_loader: Add device path related functions for initrd via Boot#### Ilias Apalodimas
2021-03-11 7:50 ` Heinrich Schuchardt
2021-03-11 9:10 ` Ilias Apalodimas
2021-03-11 11:00 ` Heinrich Schuchardt
2021-03-11 11:36 ` Ilias Apalodimas
2021-03-11 11:44 ` Heinrich Schuchardt
2021-03-11 12:31 ` Heinrich Schuchardt
2021-03-11 12:39 ` Ilias Apalodimas
2021-03-11 12:44 ` Heinrich Schuchardt
2021-03-11 12:49 ` Ilias Apalodimas
2021-03-11 13:31 ` Ilias Apalodimas
2021-03-11 20:25 ` Heinrich Schuchardt
2021-03-12 2:50 ` AKASHI Takahiro
2021-03-12 4:10 ` Ilias Apalodimas
2021-03-12 4:32 ` AKASHI Takahiro
2021-03-12 4:42 ` Ilias Apalodimas
2021-03-12 5:02 ` AKASHI Takahiro
2021-03-12 5:19 ` Ilias Apalodimas [this message]
2021-03-05 22:22 ` [PATCH 3/6] efi_loader: Introduce helper functions for EFI Ilias Apalodimas
2021-03-11 9:15 ` Heinrich Schuchardt
2021-03-05 22:23 ` [PATCH 4/6] efi_loader: Replace config option for initrd loading Ilias Apalodimas
2021-03-11 12:23 ` Heinrich Schuchardt
2021-03-11 12:30 ` Ilias Apalodimas
2021-03-11 12:50 ` Heinrich Schuchardt
2021-03-05 22:23 ` [PATCH 5/6] efidebug: add multiple device path instances on Boot#### Ilias Apalodimas
2021-03-11 12:38 ` Heinrich Schuchardt
2021-03-11 12:42 ` Ilias Apalodimas
2021-03-12 4:44 ` AKASHI Takahiro
2021-03-12 4:55 ` Ilias Apalodimas
2021-03-12 5:23 ` AKASHI Takahiro
2021-03-12 5:37 ` Ilias Apalodimas
2021-03-12 5:58 ` AKASHI Takahiro
2021-03-12 7:19 ` Ilias Apalodimas
2021-03-12 16:25 ` Heinrich Schuchardt
2021-03-05 22:23 ` [PATCH 6/6] doc: Update uefi documentation for initrd loading options Ilias Apalodimas
2021-03-11 12:39 ` Heinrich Schuchardt
2021-03-11 7:26 ` [PATCH 1/6] efi_selftest: Remove loadfile2 for initrd selftests Heinrich Schuchardt
-- strict thread matches above, loose matches on Subject: below --
2021-03-13 21:47 [PATCH 0/6 v2] Loadfile2 for initrd loading Ilias Apalodimas
2021-03-13 21:47 ` [PATCH 2/6] efi_loader: Add device path related functions for initrd via Boot#### Ilias Apalodimas
2021-03-14 7:19 ` Heinrich Schuchardt
2021-03-14 7:32 ` Ilias Apalodimas
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=YEr54SUfM1CcQ9aj@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