Thanks all for your input,

These explanations seem sufficient to us that it is not a good idea to change 
the behaviour for everyone. Even so, we still need this to be configurable in 
some way, as having to patch EDK II is impracticable.

We believe there are three possible routes to approach this problem:

- Introduce a separate ControllerConnectionLib library for this function. While 
it is small, we found several places in our code that need to call it beyond 
UEFI Shell. This way different implementations could be used depending on the 
chosen library.
- Introduce a ConnectRequiresDevicePath PCD, which will choose the preferred 
logic.
- Introduce a -dp Shell argument for affected commands the way Lazslo suggested.

We believe either route or a combination of multiple routes have their own 
benefits, and would suggest either going with 1+2 or with 3. Any approach is 
fine for us.

We will submit V2 of the patch after hearing the opinions.

Best wishes,

Vitaly

On Mon, Jan 13, 2020 at 20:55, Laszlo Ersek <ler...@redhat.com> wrote:

> 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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#53201): https://edk2.groups.io/g/devel/message/53201
Mute This Topic: https://groups.io/mt/69653841/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to