88 DBGC ( driver,
"EFIVETO %s could not unload",
116 &
count, &handles ) ) != 0 ) {
118 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
124 for ( i = 0 ; i <
count ; i++ ) {
129 DBGC ( driver,
"EFIVETO %s could not disconnect",
131 DBGC ( driver,
" %s: %s\n",
139 DBGC2 ( driver,
"EFIVETO %s disconnected all handles\n",
170 DBGC ( driver,
"EFIVETO %s could not open driver binding " 183 binding.binding,
NULL ) ) != 0 ) {
185 DBGC ( driver,
"EFIVETO %s could not uninstall driver " 186 "binding protocol: %s\n",
191 DBGC2 ( driver,
"EFIVETO %s uninstalled driver binding protocol\n",
221 DBGC ( driver,
"EFIVETO %s could not retrieve openers",
229 for ( i = 0 ; i <
count ; i++ ) {
230 opener = &openers[
count - i - 1 ];
240 DBGC ( driver,
"EFIVETO %s could not close stray open",
242 DBGC ( driver,
" of %s: %s\n",
278 DBGC ( driver,
"EFIVETO %s could not retrieve protocols",
280 DBGC ( driver,
" for %s: %s\n",
286 for ( i = 0 ; i <
count ; i++ ) {
320 &
count, &handles ) ) != 0 ) {
322 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
328 for ( i = 0 ; i <
count ; i++ ) {
336 DBGC2 ( driver,
"EFIVETO %s closed all remaining handles\n",
367 DBGC ( driver,
"EFIVETO %s forcibly removed\n",
407 static const CHAR16 ip4cfg[] = L
"IP4 CONFIG Network Service Driver";
408 static const char *dell =
"Dell Inc.";
409 static const char *itautec =
"Itautec S.A.";
419 if (
memcmp (
name, ip4cfg,
sizeof ( ip4cfg ) ) != 0 )
440 static const CHAR16 xhci[] = L
"Usb Xhci Driver";
441 static const char *hp =
"HP";
451 if (
memcmp (
name, xhci,
sizeof ( xhci ) ) != 0 )
481 static const CHAR16 uefipxebc[] = L
"UEFI PXE Base Code Driver";
482 static const char *vmware =
"VMware, Inc.";
491 if (
memcmp (
name, uefipxebc,
sizeof ( uefipxebc ) ) != 0 )
512 static const CHAR16 dhcp6[] = L
"DHCP6 Protocol Driver";
517 if (
memcmp (
name, dhcp6,
sizeof ( dhcp6 ) ) != 0 )
534 .name =
"VMware UefiPxeBc",
576 memset ( veto, 0,
sizeof ( *veto ) );
584 DBGC ( driver,
"EFIVETO %s could not open driver binding " 589 image = binding.binding->ImageHandle;
597 DBGC ( driver,
"EFIVETO %s could not open",
599 DBGC ( driver,
" %s loaded image protocol: %s\n",
615 ( ( efirc =
wtf.wtf->GetDriverName (
wtf.wtf,
"eng",
626 if (
efi_vetoes[i].veto ( binding.binding, loaded.loaded,
628 DBGC ( driver,
"EFIVETO %s is vetoed (%s)\n",
632 veto->
binding = binding.binding;
634 veto->
loaded = loaded.loaded;
687 for ( i = 0 ; i <
count ; i++ ) {
691 DBGC (
driver,
"EFIVETO %s could not determine " 699 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.
const char * name
Veto name (for debugging)
struct arbelprm_rc_send_wqe rc
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.
static int efi_veto_close_handle(struct efi_veto *veto, EFI_HANDLE handle)
Close handle potentially opened by an EFI driver.
EFI_HANDLE ControllerHandle
void efi_veto(void)
Remove any vetoed drivers.
EFI_HANDLE image
Image handle.
static int efi_veto_driver(struct efi_veto *veto)
Veto an EFI driver.
128 bit buffer containing a unique identifier value.
Retrieve all the handles in the handle database.
static int efi_veto_uninstall(struct efi_veto *veto)
Uninstall an EFI driver binding protocol.
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
EFI_IMAGE_UNLOAD UnloadImage
EFI Component Name Protocol as defined in the EFI 1.1 specification.
EFI_CLOSE_PROTOCOL CloseProtocol
static int efi_veto_find(EFI_HANDLE driver, const char *manufacturer, struct efi_veto *veto)
Find driver veto, if any.
#define PCI_CLASS_SERIAL_USB_XHCI
xHCI USB controller
UEFI 2.0 Loaded image protocol definition.
EFI_HANDLE driver
Driver binding handle.
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.
char wtf[42]
Authenticator response string.
#define __unused
Declare a variable or data structure as unused.
static struct efi_veto_candidate efi_vetoes[]
Driver vetoes.
#define PCI_CLASS(base, sub, progif)
Construct PCI class.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint16_t count
Number of entries.
int fetch_string_setting_copy(struct settings *settings, const struct setting *setting, char **data)
Fetch value of string setting.
static int efi_veto_unload(struct efi_veto *veto)
Unload an EFI driver.
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
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 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
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.
UINT64 UINTN
Unsigned value of native width.
static int efi_veto_dhcp6(EFI_DRIVER_BINDING_PROTOCOL *binding __unused, EFI_LOADED_IMAGE_PROTOCOL *loaded __unused, EFI_COMPONENT_NAME_PROTOCOL *wtf __unused, const char *manufacturer __unused, const CHAR16 *name)
Veto Dhcp6Dxe driver.
This protocol provides the services required to determine if a driver supports a given controller.
EFI_DRIVER_BINDING_PROTOCOL * binding
Driving binding protocol.
uint8_t manufacturer
Manufacturer string.
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
static int efi_veto_destroy(struct efi_veto *veto)
Terminate an EFI driver with extreme prejudice.
EFI_LOADED_IMAGE_PROTOCOL * loaded
Loaded image protocol.
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.
static int efi_veto_close_protocol(struct efi_veto *veto, EFI_HANDLE handle, EFI_GUID *protocol)
Close protocol on handle potentially opened by an EFI driver.
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_vmware_uefipxebc(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 VMware UefiPxeBcDxe driver.
static int efi_veto_disconnect(struct efi_veto *veto)
Disconnect an EFI driver from all handles.
static int efi_veto_close(struct efi_veto *veto)
Close all remaining handles opened by 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.
void * memset(void *dest, int character, size_t len) __nonnull
#define DBGC_EFI_OPENER(...)
EFI_DISCONNECT_CONTROLLER DisconnectController