92 DBGC ( driver,
"EFIVETO %s could not unload",
120 &
count, &handles ) ) != 0 ) {
122 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
128 for ( i = 0 ; i <
count ; i++ ) {
131 DBGC ( driver,
"EFIVETO %s could not disconnect",
133 DBGC ( driver,
" %s: %s\n",
141 DBGC2 ( driver,
"EFIVETO %s disconnected all handles\n",
165 &binding ) ) != 0 ) {
166 DBGC ( driver,
"EFIVETO %s could not open driver binding "
175 binding,
NULL ) ) != 0 ) {
177 DBGC ( driver,
"EFIVETO %s could not uninstall driver "
178 "binding protocol: %s\n",
183 DBGC2 ( driver,
"EFIVETO %s uninstalled driver binding protocol\n",
213 DBGC ( driver,
"EFIVETO %s could not retrieve openers",
221 for ( i = 0 ; i <
count ; i++ ) {
222 opener = &openers[
count - i - 1 ];
232 DBGC ( driver,
"EFIVETO %s could not close stray open",
234 DBGC ( driver,
" of %s: %s\n",
270 DBGC ( driver,
"EFIVETO %s could not retrieve protocols",
272 DBGC ( driver,
" for %s: %s\n",
278 for ( i = 0 ; i <
count ; i++ ) {
312 &
count, &handles ) ) != 0 ) {
314 DBGC ( driver,
"EFIVETO %s could not enumerate handles: %s\n",
320 for ( i = 0 ; i <
count ; i++ ) {
328 DBGC2 ( driver,
"EFIVETO %s closed all remaining handles\n",
359 DBGC ( driver,
"EFIVETO %s forcibly removed\n",
397 static const CHAR16 ip4cfg[] = L
"IP4 CONFIG Network Service Driver";
398 static const char *dell =
"Dell Inc.";
399 static const char *itautec =
"Itautec S.A.";
409 if (
memcmp (
name, ip4cfg,
sizeof ( ip4cfg ) ) != 0 )
428 static const CHAR16 xhci[] = L
"Usb Xhci Driver";
429 static const char *hp =
"HP";
439 if (
memcmp (
name, xhci,
sizeof ( xhci ) ) != 0 )
467 static const CHAR16 uefipxebc[] = L
"UEFI PXE Base Code Driver";
468 static const char *vmware =
"VMware, Inc.";
477 if (
memcmp (
name, uefipxebc,
sizeof ( uefipxebc ) ) != 0 )
494 .name =
"VMware UefiPxeBc",
524 &binding ) ) != 0 ) {
525 DBGC ( driver,
"EFIVETO %s could not open driver binding "
535 DBGC ( driver,
"EFIVETO %s could not open",
537 DBGC ( driver,
" %s loaded image protocol: %s\n",
556 &
name ) == 0 ) ) ) ||
557 (
wtf && ( ( efirc =
wtf->GetDriverName (
wtf,
"eng",
558 &
name ) == 0 ) ) ) ) {
573 DBGC ( driver,
"EFIVETO %s is vetoed (%s)\n",
576 veto->driver = driver;
577 veto->binding = binding;
579 veto->loaded = loaded;
618 for ( i = 0 ; i <
count ; i++ ) {
622 DBGC (
driver,
"EFIVETO %s could not determine "
630 DBGC (
driver,
"EFIVETO %s could not veto: %s\n",
UINT64 UINTN
Unsigned value of native width.
unsigned short CHAR16
2-byte Character.
#define NULL
NULL pointer (VOID *).
UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.
struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL
EFI Component Name Protocol as defined in the EFI 1.1 specification.
struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL
UEFI DriverBinding Protocol is defined in UEFI specification.
struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL
UEFI 2.0 Loaded image protocol definition.
#define PCI_CLASS_SERIAL_USB
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
@ ByProtocol
Retrieve the set of handles from the handle database that support a specified protocol.
@ AllHandles
Retrieve all the handles in the handle database.
struct arbelprm_rc_send_wqe rc
int efi_disconnect(EFI_HANDLE device, EFI_HANDLE driver)
Disconnect UEFI driver(s).
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
EFI_GUID efi_driver_binding_protocol_guid
Driver binding protocol GUID.
EFI_GUID efi_component_name_protocol_guid
Component name protocol GUID.
void efi_undrop_tpl(struct efi_dropped_tpl *tpl)
Restore dropped task priority level.
void efi_drop_tpl(struct efi_dropped_tpl *tpl)
Drop task priority level temporarily to external level.
void efi_veto(void)
Remove any vetoed drivers.
static int efi_veto_driver(struct efi_veto *veto)
Veto an EFI driver.
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.
static int efi_veto_disconnect(struct efi_veto *veto)
Disconnect an EFI driver from all handles.
static struct efi_veto_candidate efi_vetoes[]
Driver vetoes.
static int efi_veto_close_handle(struct efi_veto *veto, EFI_HANDLE handle)
Close handle potentially opened by an EFI driver.
static int efi_veto_close(struct efi_veto *veto)
Close all remaining handles opened by an EFI driver.
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_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.
static int efi_veto_unload(struct efi_veto *veto)
Unload an EFI driver.
static int efi_veto_uninstall(struct efi_veto *veto)
Uninstall an EFI driver binding protocol.
static int efi_veto_destroy(struct efi_veto *veto)
Terminate an EFI driver with extreme prejudice.
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_find(EFI_HANDLE driver, const char *manufacturer, struct efi_veto *veto)
Find driver veto, if any.
#define __unused
Declare a variable or data structure as unused.
static unsigned int count
Number of entries.
uint8_t controller
CD-ROM controller number.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
#define DBGC_EFI_OPENER(...)
#define efi_open(handle, protocol, interface)
Open protocol for ephemeral use.
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
EFI_SYSTEM_TABLE * efi_systab
uint8_t manufacturer
Manufacturer string.
void * memset(void *dest, int character, size_t len) __nonnull
char wtf[42]
Authenticator response string.
#define PCI_CLASS(base, sub, progif)
Construct PCI class.
#define PCI_CLASS_SERIAL_USB_XHCI
xHCI USB controller
#define PCI_DRIVERS
PCI driver table.
static void(* free)(struct refcnt *refcnt))
int fetch_string_setting_copy(struct settings *settings, const struct setting *setting, char **data)
Fetch value of string setting.
uint16_t protocol
Protocol ID.
char * strerror(int errno)
Retrieve string representation of error number.
int strcmp(const char *first, const char *second)
Compare strings.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
EFI_IMAGE_UNLOAD UnloadImage
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces
EFI_CLOSE_PROTOCOL CloseProtocol
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer
Can be used on any image handle to obtain information about the loaded image.
UINT64 ImageSize
The size in bytes of the loaded image.
VOID * ImageBase
The base address at which the image was loaded.
EFI Oprn Protocol Information Entry.
EFI_HANDLE ControllerHandle
EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName
EFI_HANDLE ImageHandle
The image handle of the UEFI driver that produced this instance of the EFI_DRIVER_BINDING_PROTOCOL.
An EFI dropped task priority level.
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.
EFI_DRIVER_BINDING_PROTOCOL * binding
Driving binding protocol.
EFI_HANDLE driver
Driver binding handle.
EFI_LOADED_IMAGE_PROTOCOL * loaded
Loaded image protocol.
EFI_HANDLE image
Image handle.
struct pci_class_id class
PCI class ID.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.