iPXE
|
EFI driver vetoes. More...
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ipxe/settings.h>
#include <ipxe/pci.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/Protocol/DriverBinding.h>
#include <ipxe/efi/Protocol/LoadedImage.h>
#include <ipxe/efi/Protocol/ComponentName.h>
#include <ipxe/efi/efi_veto.h>
Go to the source code of this file.
Data Structures | |
struct | efi_veto_candidate |
A driver veto candidate. More... | |
struct | efi_veto |
A driver veto. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | efi_veto_unload (struct efi_veto *veto) |
Unload an EFI driver. More... | |
static int | efi_veto_disconnect (struct efi_veto *veto) |
Disconnect an EFI driver from all handles. More... | |
static int | efi_veto_uninstall (struct efi_veto *veto) |
Uninstall an EFI driver binding protocol. More... | |
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. More... | |
static int | efi_veto_close_handle (struct efi_veto *veto, EFI_HANDLE handle) |
Close handle potentially opened by an EFI driver. More... | |
static int | efi_veto_close (struct efi_veto *veto) |
Close all remaining handles opened by an EFI driver. More... | |
static int | efi_veto_destroy (struct efi_veto *veto) |
Terminate an EFI driver with extreme prejudice. More... | |
static int | efi_veto_driver (struct efi_veto *veto) |
Veto an EFI driver. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static int | efi_veto_find (EFI_HANDLE driver, const char *manufacturer, struct efi_veto *veto) |
Find driver veto, if any. More... | |
void | efi_veto (void) |
Remove any vetoed drivers. More... | |
Variables | |
static struct efi_veto_candidate | efi_vetoes [] |
Driver vetoes. More... | |
EFI driver vetoes.
Definition in file efi_veto.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Unload an EFI driver.
veto | Driver veto |
rc | Return status code |
Definition at line 78 of file efi_veto.c.
References EFI_SYSTEM_TABLE::BootServices, DBGC, efi_veto::driver, EEFI, efi_handle_name(), efi_systab, efi_veto::image, rc, strerror(), and EFI_BOOT_SERVICES::UnloadImage.
Referenced by efi_veto_driver().
|
static |
Disconnect an EFI driver from all handles.
veto | Driver veto |
rc | Return status code |
Definition at line 104 of file efi_veto.c.
References AllHandles, EFI_SYSTEM_TABLE::BootServices, count, DBGC, DBGC2, EFI_BOOT_SERVICES::DisconnectController, efi_veto::driver, EEFI, efi_handle_name(), EFI_NOT_FOUND, efi_systab, EFI_BOOT_SERVICES::FreePool, handle, EFI_BOOT_SERVICES::LocateHandleBuffer, NULL, rc, and strerror().
Referenced by efi_veto_destroy().
|
static |
Uninstall an EFI driver binding protocol.
veto | Driver veto |
rc | Return status code |
Definition at line 154 of file efi_veto.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, DBGC, DBGC2, efi_veto::driver, EEFI, efi_driver_binding_protocol_guid, efi_handle_name(), efi_image_handle, EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_systab, NULL, EFI_BOOT_SERVICES::OpenProtocol, rc, strerror(), and EFI_BOOT_SERVICES::UninstallMultipleProtocolInterfaces.
Referenced by efi_veto_destroy().
|
static |
Close protocol on handle potentially opened by an EFI driver.
veto | Driver veto |
handle | Potentially opened handle |
protocol | Opened protocol |
rc | Return status code |
Definition at line 204 of file efi_veto.c.
References EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::AgentHandle, EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, controller, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::ControllerHandle, count, DBGC, DBGC_EFI_OPENER, efi_veto::driver, EEFI, efi_guid_ntoa(), efi_handle_name(), efi_systab, EFI_BOOT_SERVICES::FreePool, handle, efi_veto::image, EFI_BOOT_SERVICES::OpenProtocolInformation, protocol, rc, and strerror().
Referenced by efi_veto_close_handle().
|
static |
Close handle potentially opened by an EFI driver.
veto | Driver veto |
handle | Potentially opened handle |
rc | Return status code |
Definition at line 264 of file efi_veto.c.
References EFI_SYSTEM_TABLE::BootServices, count, DBGC, efi_veto::driver, EEFI, efi_handle_name(), efi_systab, efi_veto_close_protocol(), EFI_BOOT_SERVICES::FreePool, handle, protocol, EFI_BOOT_SERVICES::ProtocolsPerHandle, rc, and strerror().
Referenced by efi_veto_close().
|
static |
Close all remaining handles opened by an EFI driver.
veto | Driver veto |
rc | Return status code |
Definition at line 308 of file efi_veto.c.
References AllHandles, EFI_SYSTEM_TABLE::BootServices, count, DBGC, DBGC2, efi_veto::driver, EEFI, efi_handle_name(), efi_systab, efi_veto_close_handle(), EFI_BOOT_SERVICES::FreePool, handle, EFI_BOOT_SERVICES::LocateHandleBuffer, NULL, rc, and strerror().
Referenced by efi_veto_destroy().
|
static |
Terminate an EFI driver with extreme prejudice.
veto | Driver veto |
rc | Return status code |
Definition at line 351 of file efi_veto.c.
References DBGC, efi_veto::driver, efi_handle_name(), efi_veto_close(), efi_veto_disconnect(), efi_veto_uninstall(), and rc.
Referenced by efi_veto_driver().
|
static |
Veto an EFI driver.
veto | Driver veto |
rc | Return status code |
Definition at line 378 of file efi_veto.c.
References efi_veto_destroy(), efi_veto_unload(), and rc.
Referenced by efi_veto().
|
static |
Veto Ip4ConfigDxe driver on some platforms.
binding | Driver binding protocol |
loaded | Loaded image protocol |
wtf | Component name protocol, if present |
manufacturer | Manufacturer name, if present |
name | Driver name, if present |
vetoed | Driver is to be vetoed |
Definition at line 403 of file efi_veto.c.
References manufacturer, memcmp(), name, and strcmp().
|
static |
Veto HP XhciDxe driver.
binding | Driver binding protocol |
loaded | Loaded image protocol |
wtf | Component name protocol, if present |
manufacturer | Manufacturer name, if present |
name | Driver name, if present |
vetoed | Driver is to be vetoed |
Definition at line 436 of file efi_veto.c.
References pci_class_id::class, pci_driver::class, for_each_table_entry, manufacturer, memcmp(), name, PCI_CLASS, PCI_CLASS_SERIAL, PCI_CLASS_SERIAL_USB, PCI_CLASS_SERIAL_USB_XHCI, PCI_DRIVERS, and strcmp().
|
static |
Veto VMware UefiPxeBcDxe driver.
binding | Driver binding protocol |
loaded | Loaded image protocol |
wtf | Component name protocol, if present |
manufacturer | Manufacturer name, if present |
name | Driver name, if present |
vetoed | Driver is to be vetoed |
Definition at line 477 of file efi_veto.c.
References manufacturer, memcmp(), name, and strcmp().
|
static |
Veto Dhcp6Dxe driver.
binding | Driver binding protocol |
loaded | Loaded image protocol |
wtf | Component name protocol, if present |
manufacturer | Manufacturer name, if present |
name | Driver name, if present |
vetoed | Driver is to be vetoed |
Definition at line 507 of file efi_veto.c.
|
static |
Find driver veto, if any.
driver | Driver binding handle |
manufacturer | Manufacturer name, if present |
veto | Driver veto to fill in |
rc | Return status code |
Definition at line 551 of file efi_veto.c.
References efi_veto::binding, EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, DBGC, DBGC2, efi_veto::driver, EEFI, efi_component_name_protocol_guid, efi_driver_binding_protocol_guid, efi_handle_name(), efi_image_handle, efi_loaded_image_protocol_guid, EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_systab, efi_vetoes, efi_veto::image, efi_veto::loaded, manufacturer, memset(), name, NULL, EFI_BOOT_SERVICES::OpenProtocol, rc, strerror(), and wtf.
Referenced by efi_veto().
void efi_veto | ( | void | ) |
Remove any vetoed drivers.
Definition at line 660 of file efi_veto.c.
References EFI_SYSTEM_TABLE::BootServices, ByProtocol, count, DBGC, efi_veto::driver, EEFI, efi_driver_binding_protocol_guid, efi_handle_name(), efi_systab, efi_veto_driver(), efi_veto_find(), efi_vetoes, fetch_string_setting_copy(), free, EFI_BOOT_SERVICES::FreePool, EFI_BOOT_SERVICES::LocateHandleBuffer, manufacturer, NULL, rc, and strerror().
Referenced by efi_probe().
|
static |
Driver vetoes.
Definition at line 524 of file efi_veto.c.
Referenced by efi_veto(), and efi_veto_find().