Date
1 - 3 of 3
THe driver image handle
Feng Libo <lbfeng@...>
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. Thanks -- Best Regards Feng Libo ZD Technology (Beijing) Co., Ltd
|
|
Tomas Pilar (tpilar)
Hi Libo,
toggle quoted messageShow quoted text
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. Cheers, Tom
On Fri, Sep 4, 2020 at 2:43 AM Feng Libo <lbfeng@...> wrote:
Hello, Madam/Sir,
|
|
Laszlo Ersek
On 09/04/20 13:04, Tomas Pilar (tpilar) wrote:
Hi Libo,See also the EfiTestManagedDevice() and EfiTestChildHandle() utility functions in UefiLib. Thanks Laszlo
|
|