87 DBGC ( driver,
"EFIVETO %s could not unload",
115 &
count, &handles ) ) != 0 ) {
117 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
123 for ( i = 0 ; i <
count ; i++ ) {
126 DBGC ( driver,
"EFIVETO %s could not disconnect",
128 DBGC ( driver,
" %s: %s\n",
136 DBGC2 ( driver,
"EFIVETO %s disconnected all handles\n",
160 &binding ) ) != 0 ) {
161 DBGC ( driver,
"EFIVETO %s could not open driver binding " 170 binding,
NULL ) ) != 0 ) {
172 DBGC ( driver,
"EFIVETO %s could not uninstall driver " 173 "binding protocol: %s\n",
178 DBGC2 ( driver,
"EFIVETO %s uninstalled driver binding protocol\n",
208 DBGC ( driver,
"EFIVETO %s could not retrieve openers",
216 for ( i = 0 ; i <
count ; i++ ) {
217 opener = &openers[
count - i - 1 ];
227 DBGC ( driver,
"EFIVETO %s could not close stray open",
229 DBGC ( driver,
" of %s: %s\n",
265 DBGC ( driver,
"EFIVETO %s could not retrieve protocols",
267 DBGC ( driver,
" for %s: %s\n",
273 for ( i = 0 ; i <
count ; i++ ) {
307 &
count, &handles ) ) != 0 ) {
309 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
315 for ( i = 0 ; i <
count ; i++ ) {
323 DBGC2 ( driver,
"EFIVETO %s closed all remaining handles\n",
354 DBGC ( driver,
"EFIVETO %s forcibly removed\n",
392 static const CHAR16 ip4cfg[] = L
"IP4 CONFIG Network Service Driver";
393 static const char *dell =
"Dell Inc.";
394 static const char *itautec =
"Itautec S.A.";
404 if (
memcmp (
name, ip4cfg,
sizeof ( ip4cfg ) ) != 0 )
423 static const CHAR16 xhci[] = L
"Usb Xhci Driver";
424 static const char *hp =
"HP";
434 if (
memcmp (
name, xhci,
sizeof ( xhci ) ) != 0 )
462 static const CHAR16 uefipxebc[] = L
"UEFI PXE Base Code Driver";
463 static const char *vmware =
"VMware, Inc.";
472 if (
memcmp (
name, uefipxebc,
sizeof ( uefipxebc ) ) != 0 )
491 static const CHAR16 dhcp6[] = L
"DHCP6 Protocol Driver";
496 if (
memcmp (
name, dhcp6,
sizeof ( dhcp6 ) ) != 0 )
513 .name =
"VMware UefiPxeBc",
547 &binding ) ) != 0 ) {
548 DBGC ( driver,
"EFIVETO %s could not open driver binding " 558 DBGC ( driver,
"EFIVETO %s could not open",
560 DBGC ( driver,
" %s loaded image protocol: %s\n",
579 &
name ) == 0 ) ) ) ||
580 (
wtf && ( ( efirc =
wtf->GetDriverName (
wtf,
"eng",
581 &
name ) == 0 ) ) ) ) {
596 DBGC ( driver,
"EFIVETO %s is vetoed (%s)\n",
599 veto->driver = driver;
600 veto->binding = binding;
602 veto->loaded = loaded;
641 for ( i = 0 ; i <
count ; i++ ) {
645 DBGC (
driver,
"EFIVETO %s could not determine " 653 DBGC (
driver,
"EFIVETO %s could not veto: %s\n",
UEFI DriverBinding Protocol is defined in UEFI specification.
static int efi_veto_vmware_uefipxebc(EFI_DRIVER_BINDING_PROTOCOL *binding __unused, EFI_LOADED_IMAGE_PROTOCOL *loaded __unused, const char *manufacturer, const CHAR16 *name)
Veto VMware UefiPxeBcDxe driver.
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
const char * name
Veto name (for debugging)
int(* veto)(EFI_DRIVER_BINDING_PROTOCOL *binding, EFI_LOADED_IMAGE_PROTOCOL *loaded, const char *manufacturer, const CHAR16 *name)
Check if driver is vetoed.
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
This protocol is used to retrieve user readable names of drivers and controllers managed by UEFI Driv...
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.
UINT64 ImageSize
The size in bytes of the loaded image.
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.
static int efi_veto_ip4config(EFI_DRIVER_BINDING_PROTOCOL *binding __unused, EFI_LOADED_IMAGE_PROTOCOL *loaded __unused, const char *manufacturer, const CHAR16 *name)
Veto Ip4ConfigDxe driver on some platforms.
EFI_IMAGE_UNLOAD UnloadImage
VOID * ImageBase
The base address at which the image was loaded.
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.
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.
UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.
EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName
#define PCI_CLASS(base, sub, progif)
Construct PCI class.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static unsigned int 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.
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
#define PCI_CLASS_SERIAL_USB
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
#define efi_open(handle, protocol, interface)
Open protocol for ephemeral use.
UINT64 UINTN
Unsigned value of native width.
This protocol provides the services required to determine if a driver supports a given controller.
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
EFI_DRIVER_BINDING_PROTOCOL * binding
Driving binding protocol.
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
EFI_HANDLE ImageHandle
The image handle of the UEFI driver that produced this instance of the EFI_DRIVER_BINDING_PROTOCOL.
uint8_t manufacturer
Manufacturer string.
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
static int efi_veto_hp_xhci(EFI_DRIVER_BINDING_PROTOCOL *binding __unused, EFI_LOADED_IMAGE_PROTOCOL *loaded __unused, const char *manufacturer, const CHAR16 *name)
Veto HP XhciDxe driver.
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.
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.
static int efi_veto_dhcp6(EFI_DRIVER_BINDING_PROTOCOL *binding __unused, EFI_LOADED_IMAGE_PROTOCOL *loaded __unused, const char *manufacturer __unused, const CHAR16 *name)
Veto Dhcp6Dxe driver.
Retrieve the set of handles from the handle database that support a specified protocol.
EFI_SYSTEM_TABLE * efi_systab
EFI_GUID efi_component_name_protocol_guid
Component name protocol GUID.
uint16_t protocol
Protocol ID.
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
int efi_disconnect(EFI_HANDLE device, EFI_HANDLE driver)
Disconnect UEFI driver(s)
#define PCI_DRIVERS
PCI driver table.
void * memset(void *dest, int character, size_t len) __nonnull
#define DBGC_EFI_OPENER(...)