public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] efi_loader: device_path: show a host device in understandable form
Date: Fri, 13 Sep 2019 09:20:53 +0900	[thread overview]
Message-ID: <20190913002052.GW4398@linaro.org> (raw)
In-Reply-To: <59647c34-848e-1fd9-0bb2-119d894a37bb@gmx.de>

On Thu, Sep 12, 2019 at 11:50:04AM +0200, Heinrich Schuchardt wrote:
> On 9/12/19 11:07 AM, AKASHI Takahiro wrote:
> > On Thu, Sep 12, 2019 at 09:59:01AM +0200, Heinrich Schuchardt wrote:
> >> On 9/12/19 6:52 AM, AKASHI Takahiro wrote:
> >>> It would be better to give a user-friendly text to a host device
> >>> on sandbox instead of just dumping its guid.
> >>>
> >>> => host bind 0 /opt/disk/uboot_sandbox_fat.img
> >>> => efi devices
> >>> Device           Device Path
> >>> ================ ====================
> >>> 0000000015c1f3a0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)
> >>> 0000000015c20f00 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Hostdev(0)
> >>>
> >>> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >>> ---
> >>>  lib/efi_loader/efi_device_path_to_text.c | 5 +++++
> >>>  1 file changed, 5 insertions(+)
> >>>
> >>> diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
> >>> index 96fd08971b73..40a06b70e08a 100644
> >>> --- a/lib/efi_loader/efi_device_path_to_text.c
> >>> +++ b/lib/efi_loader/efi_device_path_to_text.c
> >>> @@ -62,6 +62,11 @@ static char *dp_hardware(char *s, struct efi_device_path *dp)
> >>>  	case DEVICE_PATH_SUB_TYPE_VENDOR: {
> >>>  		struct efi_device_path_vendor *vdp =
> >>>  			(struct efi_device_path_vendor *)dp;
> >>> +#ifdef CONFIG_SANDBOX
> >>> +		if (!guidcmp(&vdp->guid, &efi_guid_host_dev))
> >>> +			s += sprintf(s, "Hostdev(%d)", vdp->vendor_data[0]);
> >>
> >> This does not conform to the UEFI spec.
> >
> > Okay, so I'd like to change the format again.
> > Instead of 'Vendor' subtype, use 'Controller' subtype.
> > This way, the example above can be seen as:
> >
> > 0000000015c1f3a0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)
> > 0000000015c20f00 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Ctrl(0)
> >
> > Looks nice, doesn't it?
> 
> A controller is a handle that bears the EFI_DRIVER_BINDING_PROTOCOL.

To my best knowledge, I don't find such a definition in the specification.

> >> The purpose of the sandbox is testing. What would make sense to me is
> >> checking in a Python test that The VenHw() output contains the GUID and
> >> the drive number.

For *that* reason, we don't have to stick to strict *standardized*
form for Sandbox host device. It would never cause any problems
as such a text would never come up on any other platforms.

-Takahiro Akashi


> >>
> >> Best regards
> >>
> >> Heinrich
> >>
> >>> +		else
> >>> +#endif
> >>>  		s += sprintf(s, "VenHw(%pUl)", &vdp->guid);
> >>>  		break;
> >>>  	}
> >>>
> >>
> >
> 

  reply	other threads:[~2019-09-13  0:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  4:52 [U-Boot] [PATCH v2 0/2] efi_loader: device_path: support Sandbox's host device AKASHI Takahiro
2019-09-12  4:52 ` [U-Boot] [PATCH v2 1/2] efi_loader: device_path: support Sandbox's "host" devices AKASHI Takahiro
2019-09-12  8:26   ` Heinrich Schuchardt
2019-09-12  4:52 ` [U-Boot] [PATCH v2 2/2] efi_loader: device_path: show a host device in understandable form AKASHI Takahiro
2019-09-12  7:59   ` Heinrich Schuchardt
2019-09-12  9:07     ` AKASHI Takahiro
2019-09-12  9:50       ` Heinrich Schuchardt
2019-09-13  0:20         ` AKASHI Takahiro [this message]
2019-10-03  6:56           ` AKASHI Takahiro
2019-10-03 13:58             ` Heinrich Schuchardt
2019-10-04  0:18               ` 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=20190913002052.GW4398@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox