Commit Graph

6 Commits (e3eedb0be581b7f3df70e8150c7adfcf275506b8)

Author SHA1 Message Date
Michael Brown e3eedb0be5 [efi] Avoid using potentially uninitialised driver name in veto checks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-12-08 15:52:25 +00:00
Michael Brown b6e2ea03b0 [efi] Veto the HP XhciDxe Driver
The HP XhciDxe driver (observed on an HP EliteBook 840 G6) does not
respond correctly to driver disconnection, and will leave the PciIo
protocol instance opened with BY_DRIVER attributes even after
returning successfully from its Stop() method.  This prevents iPXE
from subsequently connecting to the PCI device handle.

Veto this driver if the iPXE build includes a native xHCI driver.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-11-30 19:34:57 +00:00
Michael Brown 63625b43e9 [efi] Allow vetoing of drivers that cannot be unloaded
Some UEFI drivers (observed with the "Usb Xhci Driver" on an HP
EliteBook) are particularly badly behaved: they cannot be unloaded and
will leave handles opened with BY_DRIVER attributes even after
disconnecting the driver, thereby preventing a replacement iPXE driver
from opening the handle.

Allow such drivers to be vetoed by falling back to a brute-force
mechanism that will disconnect the driver from all handles, uninstall
the driver binding protocol (to prevent it from attaching to any new
handles), and finally close any stray handles that the vetoed driver
has left open.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-11-30 19:34:57 +00:00
Michael Brown 354c252ee1 [efi] Provide manufacturer and driver names to all veto checking methods
Most veto checks are likely to use the manufacturer name and driver
name, so pass these as parameters to minimise code duplication.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-11-30 17:54:22 +00:00
Michael Brown 0b5467b658 [efi] Report correct error when failing to unload a vetoed driver
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-11-24 15:42:43 +00:00
Michael Brown 0e26220902 [efi] Rename efi_blacklist to efi_veto
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-11-07 23:30:56 +00:00