72 if ( ( efirc = bs->
UnloadImage ( driver ) ) != 0 ) {
74 DBGC ( driver,
"EFIVETO %s could not unload: %s\n",
99 &
count, &handles ) ) != 0 ) {
101 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
107 for ( i = 0 ; i <
count ; i++ ) {
112 DBGC ( driver,
"EFIVETO %s could not disconnect",
114 DBGC ( driver,
" %s: %s\n",
122 DBGC2 ( driver,
"EFIVETO %s disconnected all handles\n",
152 DBGC ( driver,
"EFIVETO %s could not open driver binding " 165 binding.binding,
NULL ) ) != 0 ) {
167 DBGC ( driver,
"EFIVETO %s could not uninstall driver " 168 "binding protocol: %s\n",
173 DBGC2 ( driver,
"EFIVETO %s uninstalled driver binding protocol\n",
201 DBGC ( driver,
"EFIVETO %s could not retrieve openers",
209 for ( i = 0 ; i <
count ; i++ ) {
210 opener = &openers[i];
218 DBGC ( driver,
"EFIVETO %s could not close stray open",
220 DBGC ( driver,
" of %s: %s\n",
254 DBGC ( driver,
"EFIVETO %s could not retrieve protocols",
256 DBGC ( driver,
" for %s: %s\n",
262 for ( i = 0 ; i <
count ; i++ ) {
264 protocols[i] ) ) != 0 )
293 &
count, &handles ) ) != 0 ) {
295 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
301 for ( i = 0 ; i <
count ; i++ ) {
303 handles[i] ) ) != 0 )
309 DBGC2 ( driver,
"EFIVETO %s closed all remaining handles\n",
339 DBGC ( driver,
"EFIVETO %s forcibly removed\n",
379 static const CHAR16 ip4cfg[] = L
"IP4 CONFIG Network Service Driver";
380 static const char *dell =
"Dell Inc.";
381 static const char *itautec =
"Itautec S.A.";
391 if (
memcmp (
name, ip4cfg,
sizeof ( ip4cfg ) ) != 0 )
412 static const CHAR16 xhci[] = L
"Usb Xhci Driver";
413 static const char *hp =
"HP";
423 if (
memcmp (
name, xhci,
sizeof ( xhci ) ) != 0 )
491 DBGC ( driver,
"EFIVETO %s could not open driver binding " 496 image = binding.binding->ImageHandle;
504 DBGC ( driver,
"EFIVETO %s could not open",
506 DBGC ( driver,
" %s loaded image protocol: %s\n",
517 wtf.interface =
NULL;
522 ( ( efirc = wtf.wtf->GetDriverName ( wtf.wtf,
"eng",
533 if (
efi_vetoes[i].veto ( binding.binding, loaded.loaded,
575 NULL, &num_drivers, &drivers ) ) != 0 ) {
587 for ( i = 0 ; i < num_drivers ; i++ ) {
591 DBGC ( driver,
"EFIVETO %s could not determine " 598 DBGC ( driver,
"EFIVETO %s is vetoed (%s)\n",
601 DBGC ( driver,
"EFIVETO %s could not veto: %s\n",
UEFI DriverBinding Protocol is defined in UEFI specification.
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
struct arbelprm_rc_send_wqe rc
static int efi_veto_destroy(EFI_HANDLE driver)
Terminate an EFI driver with extreme prejudice.
EFI Oprn Protocol Information Entry.
This protocol is used to retrieve user readable names of drivers and controllers managed by UEFI Driv...
struct pci_class_id class
PCI class ID.
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
const char * name
Veto name (for debugging)
EFI_HANDLE ControllerHandle
void efi_veto(void)
Remove any vetoed drivers.
128 bit buffer containing a unique identifier value.
static int efi_veto_close_handle(EFI_HANDLE driver, EFI_HANDLE handle)
Close handle potentially opened by an EFI driver.
Retrieve all the handles in the handle database.
static struct efi_veto efi_vetoes[]
Driver vetoes.
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
static int efi_veto_close_protocol(EFI_HANDLE driver, EFI_HANDLE handle, EFI_GUID *protocol)
Close protocol on handle potentially opened by an EFI driver.
EFI_IMAGE_UNLOAD UnloadImage
EFI Component Name Protocol as defined in the EFI 1.1 specification.
EFI_CLOSE_PROTOCOL CloseProtocol
static int efi_veto_close(EFI_HANDLE driver)
Close all remaining handles opened by an EFI driver.
#define PCI_CLASS_SERIAL_USB_XHCI
xHCI USB controller
UEFI 2.0 Loaded image protocol definition.
Can be used on any image handle to obtain information about the loaded image.
static int efi_veto_hp_xhci(EFI_DRIVER_BINDING_PROTOCOL *binding __unused, EFI_LOADED_IMAGE_PROTOCOL *loaded __unused, EFI_COMPONENT_NAME_PROTOCOL *wtf __unused, const char *manufacturer, const CHAR16 *name)
Veto HP XhciDxe driver.
static int efi_veto_unload(EFI_HANDLE driver)
Unload an EFI driver.
#define PCI_CLASS(base, sub, progif)
Construct PCI class.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int fetch_string_setting_copy(struct settings *settings, const struct setting *setting, char **data)
Fetch value of string setting.
int(* veto)(EFI_DRIVER_BINDING_PROTOCOL *binding, EFI_LOADED_IMAGE_PROTOCOL *loaded, EFI_COMPONENT_NAME_PROTOCOL *wtf, const char *manufacturer, const CHAR16 *name)
Check if driver is vetoed.
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
static int efi_veto_uninstall(EFI_HANDLE driver)
Uninstall an EFI driver binding protocol.
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
char * strerror(int errno)
Retrieve string representation of error number.
static int efi_veto_find(EFI_HANDLE driver, const char *manufacturer, struct efi_veto **veto)
Find driver veto, if any.
static void(* free)(struct refcnt *refcnt))
#define PCI_CLASS_SERIAL_USB
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
static int efi_veto_ip4config(EFI_DRIVER_BINDING_PROTOCOL *binding __unused, EFI_LOADED_IMAGE_PROTOCOL *loaded __unused, EFI_COMPONENT_NAME_PROTOCOL *wtf __unused, const char *manufacturer, const CHAR16 *name)
Veto Ip4ConfigDxe driver on some platforms.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
UINT64 UINTN
Unsigned value of native width.
This protocol provides the services required to determine if a driver supports a given controller.
uint8_t manufacturer
Manufacturer string.
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
static int efi_veto_disconnect(EFI_HANDLE driver)
Disconnect an EFI driver from all handles.
#define __unused
Declare a variable or data structure as unused.
uint8_t controller
CD-ROM controller number.
#define EFI_NOT_FOUND
Enumeration of EFI_STATUS.
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
int strcmp(const char *first, const char *second)
Compare strings.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
uint16_t count
Number of entries.
Retrieve the set of handles from the handle database that support a specified protocol.
EFI_SYSTEM_TABLE * efi_systab
EFI_OPEN_PROTOCOL OpenProtocol
EFI_GUID efi_component_name_protocol_guid
Component name protocol GUID.
uint16_t protocol
Protocol ID.
static int efi_veto_driver(EFI_HANDLE driver)
Veto an EFI driver.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
EFI_GUID efi_driver_binding_protocol_guid
Driver binding protocol GUID.
#define NULL
NULL pointer (VOID *)
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
#define PCI_DRIVERS
PCI driver table.
#define DBGC_EFI_OPENER(...)
EFI_DISCONNECT_CONTROLLER DisconnectController