All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC v2 03/11] efi_loader: device_path: handle special case of loading
Date: Thu, 28 Mar 2019 10:17:10 +0900	[thread overview]
Message-ID: <20190328011709.GV9937@linaro.org> (raw)
In-Reply-To: <be083b16-36d0-1c19-fb83-578d2fd6b882@gmx.de>

On Wed, Mar 27, 2019 at 07:17:02AM +0100, Heinrich Schuchardt wrote:
> On 3/27/19 5:40 AM, AKASHI Takahiro wrote:
> > This is a preparatory patch.
> >
> > efi_dp_split_file_path() is used to create device_path and file_path
> > from file_path for efi_setup_loaded_image().
> > In a special case, however, of HARDWARE_DEVICE/MEMORY, it doesn't
> > work expectedly since this path doesn't contain any FILE_PATH sub-type.
> 
> As already mentioned in a comment to patch 1/11 I would prefer that we
> pass the original device path to efi_setup_loaded_image() instead of
> recombining device path and file path there again.

This change would only come, as I said, after do_efi_selftest() is
also refactored.

Thanks,
-Takahiro Akashi

> This would avoid special treatment here with possible side effects in
> efi_fs_from_path().
> 
> Best regards
> 
> Heinrich
> 
> >
> > This patch makes a workaround.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> >  lib/efi_loader/efi_device_path.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
> > index 53b40c8c3c2d..e283fad767ed 100644
> > --- a/lib/efi_loader/efi_device_path.c
> > +++ b/lib/efi_loader/efi_device_path.c
> > @@ -933,6 +933,14 @@ efi_status_t efi_dp_split_file_path(struct efi_device_path *full_path,
> >  	dp = efi_dp_dup(full_path);
> >  	if (!dp)
> >  		return EFI_OUT_OF_RESOURCES;
> > +
> > +	if (EFI_DP_TYPE(dp, HARDWARE_DEVICE, MEMORY)) {
> > +		/* no FILE_PATH */
> > +		*device_path = dp;
> > +
> > +		return EFI_SUCCESS;
> > +	}
> > +
> >  	p = dp;
> >  	while (!EFI_DP_TYPE(p, MEDIA_DEVICE, FILE_PATH)) {
> >  		p = efi_dp_next(p);
> >
> 
> 
> 
> 

  reply	other threads:[~2019-03-28  1:17 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27  4:40 [U-Boot] [RFC v2 00/11] efi_loader: rework bootefi/bootmgr AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 01/11] efi_loader: boottime: add loaded image device path protocol to image handle AKASHI Takahiro
2019-03-27  5:58   ` Heinrich Schuchardt
2019-03-27 21:25     ` Heinrich Schuchardt
2019-03-28  1:13     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 02/11] efi_loader: boottime: export efi_[un]load_image() AKASHI Takahiro
2019-03-27 21:26   ` Heinrich Schuchardt
2019-03-27  4:40 ` [U-Boot] [RFC v2 03/11] efi_loader: device_path: handle special case of loading AKASHI Takahiro
2019-03-27  6:17   ` Heinrich Schuchardt
2019-03-28  1:17     ` AKASHI Takahiro [this message]
2019-03-27  4:40 ` [U-Boot] [RFC v2 04/11] cmd: bootefi: carve out fdt handling from do_bootefi() AKASHI Takahiro
2019-03-27  6:29   ` Heinrich Schuchardt
2019-03-28  1:26     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 05/11] cmd: bootefi: merge efi_install_fdt() and efi_process_fdt() AKASHI Takahiro
2019-03-27  6:33   ` Heinrich Schuchardt
2019-03-28  1:31     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 06/11] cmd: bootefi: carve out efi_selftest code from do_bootefi() AKASHI Takahiro
2019-03-27  6:45   ` Heinrich Schuchardt
2019-03-28  2:00     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 07/11] cmd: bootefi: move do_bootefi_bootmgr_exec() forward AKASHI Takahiro
2019-03-27  6:50   ` Heinrich Schuchardt
2019-03-28  2:13     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 08/11] cmd: bootefi: carve out bootmgr code from do_bootefi() AKASHI Takahiro
2019-04-12  5:55   ` Heinrich Schuchardt
2019-04-12  7:06     ` AKASHI Takahiro
2019-04-12  8:58       ` Heinrich Schuchardt
2019-04-12 14:19         ` AKASHI Takahiro
2019-04-12 20:28           ` Heinrich Schuchardt
2019-04-16  4:20             ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 09/11] cmd: bootefi: carve out do_boot_efi() " AKASHI Takahiro
2019-04-12  5:59   ` Heinrich Schuchardt
2019-04-12  7:22     ` AKASHI Takahiro
2019-04-12  9:01       ` Heinrich Schuchardt
2019-03-27  4:40 ` [U-Boot] [RFC v2 10/11] efi_loader: rework bootmgr/bootefi using load_image API AKASHI Takahiro
2019-04-12  5:53   ` Heinrich Schuchardt
2019-04-12  8:38     ` AKASHI Takahiro
2019-04-12  8:55       ` Heinrich Schuchardt
2019-03-27  4:40 ` [U-Boot] [RFC v2 11/11] cmd: add efibootmgr command AKASHI Takahiro
2019-03-27  7:10   ` Heinrich Schuchardt
2019-03-31 18:27     ` Alexander Graf
2019-04-12  1:18 ` [U-Boot] [RFC v2 00/11] efi_loader: rework bootefi/bootmgr AKASHI Takahiro
2019-04-12  6:11   ` Heinrich Schuchardt
2019-04-12  6:25     ` 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=20190328011709.GV9937@linaro.org \
    --to=takahiro.akashi@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.