Re: THe driver image handle

Tomas Pilar (tpilar)

Hi Libo,

The convention says that when a driver manages a device, it should find the
relevant IO protocol installed on the device handle (for example a PCI
device will have EFI_PCI_IO_PROTOCOL) and open it using
the EFI_OPEN_PROTOCOL_BY_DRIVER attribute. The driver will keep the
protocol open for the entire duration while it manages the device. You can
use boot services (UefiBootServicesTableLib.h), in particular the
gBS->OpenProtocolInformation() function, to inspect who has a specific
protocol on a specific handle open and with what attributes.

Now, if you are a user and you boot into UEFI shell, all you have to do is
inspect the (shell) handle using the 'dh -d -v <handle>' command.


On Fri, Sep 4, 2020 at 2:43 AM Feng Libo <> wrote:

Hello, Madam/Sir,

I have a problem:

Given a device handle, How to find the driver image handles that are
managing the controller? The drivers are compliant to the UEFI driver model.



Best Regards

Feng Libo
ZD Technology (Beijing) Co., Ltd

Join to automatically receive all group messages.