public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, ray.ni@intel.com,
	vit9696 <vit9696@protonmail.com>,
	"Gao, Zhichao" <zhichao.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg: Do not connect handles without device paths
Date: Mon, 13 Jan 2020 18:55:59 +0100	[thread overview]
Message-ID: <0f80880e-417c-6aaf-4dfe-16158dd799c0@redhat.com> (raw)
In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C3F2C88@SHSMSX104.ccr.corp.intel.com>

On 01/13/20 12:56, Ni, Ray wrote:
> We shouldn't assume that a DriverBindingStart() can only start on a handle with device path installed. DevicePath protocol is just a special protocol.
> It's possible that a bus driver starts on a host controller handle and creates multiple children, each with only a Specific_IO protocol installed.
> Certain device driver can start on the children handle and open the Specific_IO protocol BY_DRIVER.
> I am not sure if certain today's network drivers may work like this. It's allowed per UEFI spec.

I agree.

Under "10.2 EFI Device Path Protocol", the spec says, "If the handle
does not logically map to a physical device, the handle may not
necessarily support the device path protocol."

I think gBS->ConnectController() and
EFI_DRIVER_BINDING_PROTOCOL.Supported() should work on such handles.

If we'd like to work around related issues in drivers, then I'd suggest
new command line options for the "load", "connect", "reconnect" shell
commands (maybe more), for filtering out handles that do not carry
device paths. Such command line options could be added as an extension,
IIUC, such as "-_option". I.e., I believe it's not necessary to start
with UEFI Shell Spec updates.

Thanks
Laszlo


  reply	other threads:[~2020-01-13 17:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-12 21:38 [PATCH 0/1] ShellPkg: Do not connect handles without device paths Vitaly Cheptsov
2020-01-12 21:38 ` [PATCH 1/1] " Vitaly Cheptsov
2020-01-13  8:11   ` [edk2-devel] " Gao, Zhichao
2020-01-13  9:19     ` Vitaly Cheptsov
2020-01-13 11:56       ` Ni, Ray
2020-01-13 17:55         ` Laszlo Ersek [this message]
2020-01-13 20:46           ` Vitaly Cheptsov
2020-01-14  2:53             ` Ni, Ray
2020-01-14  8:36               ` Vitaly Cheptsov
2020-01-14 10:34                 ` Vitaly Cheptsov
2020-01-14 12:53                   ` Laszlo Ersek

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-list 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=0f80880e-417c-6aaf-4dfe-16158dd799c0@redhat.com \
    --to=devel@edk2.groups.io \
    /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