All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: u-boot@lists.denx.de
Subject: [RFC PATCH 1/3] efi_loader: Introduce helper functions for EFI
Date: Thu, 14 Jan 2021 11:46:29 +0200	[thread overview]
Message-ID: <YAAS9dwU66seybsC@apalos.home> (raw)
In-Reply-To: <20210114044828.GB25252@laputa>

Akashi-san,

> > +					efi_uintn_t *size, int idx)
[...]
> 
> The type of "idx" should be 'enum load_option_dp_type'.
> 
> Currently, "idx" is used as an index into the array of device paths,
> but given each device path is set to have its own guid, "idx" should be
> unlinked from the 'order' within the array.
> 
> Even if you don't want so, this function should at least take care of
> some special cases like
> <execution image> + (no initrd) + <dtb>
> Alternatively, "END device path" can be put at the second place.
> 
> I expect that handling those corner cases should be described explicitly.
> 

True, I'll refactor this a bit and allow us to extend it to load DTBs in the
future.

> > +{
> > +	struct efi_device_path *instance = NULL;
> > +

[...]

> > +/**
> > + * efi_get_fp_from_var() - Retrieve and return a device path from an EFI
> > + *			   Boot### variable
> > + *
> > + * @idx:	index of the instance to retrieve
> > + *
> > + * Return:	device path of NULL. Caller must free the returned value
> > + */
> > +struct efi_device_path *efi_get_fp_from_boot(int idx)
> 
> Are you sure that this function is called only when "BootCurrent"
> is appropriately set?
> 

Yea, this is either used on the function called by the EFI-stub or
try_load_entry() where the BootCurrent value is set explicitly.

Regards
/Ilias

  parent reply	other threads:[~2021-01-14  9:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 11:11 [RFC 0/3] Change logic of EFI LoadFile2 protocol for initrd loading Ilias Apalodimas
2021-01-13 11:11 ` [RFC PATCH 1/3] efi_loader: Introduce helper functions for EFI Ilias Apalodimas
2021-01-13 12:41   ` Heinrich Schuchardt
2021-01-13 13:30     ` Ilias Apalodimas
2021-01-14  4:48   ` AKASHI Takahiro
2021-01-14  4:57     ` Heinrich Schuchardt
2021-01-14 10:54       ` Ilias Apalodimas
2021-01-14  9:46     ` Ilias Apalodimas [this message]
2021-01-13 11:11 ` [RFC PATCH 2/3] efi_loader: efi_loader: Replace config option for initrd loading Ilias Apalodimas
2021-01-13 13:08   ` Heinrich Schuchardt
2021-01-13 13:23     ` Ilias Apalodimas
2021-01-14  4:23   ` AKASHI Takahiro
2021-01-14  9:40     ` Ilias Apalodimas
2021-01-13 11:11 ` [RFC PATCH 3/3] efidebug: add multiple device path instances on Boot#### Ilias Apalodimas
2021-01-13 13:13   ` Heinrich Schuchardt
2021-01-13 13:21     ` Ilias Apalodimas
2021-01-14  5:11   ` AKASHI Takahiro
2021-01-14  9:55     ` Ilias Apalodimas
2021-01-14 12:07       ` Heinrich Schuchardt
2021-01-14 12:36         ` Ilias Apalodimas
2021-01-15  2:16           ` AKASHI Takahiro

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=YAAS9dwU66seybsC@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 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.