TianoCore EDK2 master
|
#include "UefiLibInternal.h"
Go to the source code of this file.
Library functions that abstract driver model protocols installation and uninstallation.
Copyright (c) 2019, NVIDIA Corporation. All rights reserved. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibInstallAllDriverProtocols | ( | IN CONST EFI_HANDLE | ImageHandle, |
IN CONST EFI_SYSTEM_TABLE * | SystemTable, | ||
IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, | ||
IN EFI_HANDLE | DriverBindingHandle, | ||
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName | OPTIONAL, | ||
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration | OPTIONAL, | ||
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics | OPTIONAL | ||
) |
Installs and completes the initialization of a Driver Binding Protocol instance and optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols.
Initializes a driver by installing the Driver Binding Protocol together with the optional Component Name, optional Driver Configure and optional Driver Diagnostic Protocols onto the driver's DriverBindingHandle. If DriverBindingHandle is NULL, then the protocols are installed onto a newly created handle. DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. If DriverBinding is NULL, then ASSERT(). If the installation fails, then ASSERT().
ImageHandle | The image handle of the driver. |
SystemTable | The EFI System Table that was passed to the driver's entry point. |
DriverBinding | A Driver Binding Protocol instance that this driver is producing. |
DriverBindingHandle | The handle that DriverBinding is to be installed onto. If this parameter is NULL, then a new handle is created. |
ComponentName | A Component Name Protocol instance that this driver is producing. |
DriverConfiguration | A Driver Configuration Protocol instance that this driver is producing. |
DriverDiagnostics | A Driver Diagnostics Protocol instance that this driver is producing. |
EFI_SUCCESS | The protocol installation successfully completed. |
EFI_OUT_OF_RESOURCES | There was not enough memory in pool to install all the protocols. |
Definition at line 132 of file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibInstallAllDriverProtocols2 | ( | IN CONST EFI_HANDLE | ImageHandle, |
IN CONST EFI_SYSTEM_TABLE * | SystemTable, | ||
IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, | ||
IN EFI_HANDLE | DriverBindingHandle, | ||
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName | OPTIONAL, | ||
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 | OPTIONAL, | ||
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration | OPTIONAL, | ||
IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 | OPTIONAL, | ||
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics | OPTIONAL, | ||
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 | OPTIONAL | ||
) |
Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.
Initializes a driver by installing the Driver Binding Protocol together with the optional Component Name, optional Component Name 2, optional Driver Configuration, optional Driver Configuration 2, optional Driver Diagnostic, and optional Driver Diagnostic 2 Protocols onto the driver's DriverBindingHandle. DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. If DriverBinding is NULL, then ASSERT(). If the installation fails, then ASSERT().
ImageHandle | The image handle of the driver. |
SystemTable | The EFI System Table that was passed to the driver's entry point. |
DriverBinding | A Driver Binding Protocol instance that this driver is producing. |
DriverBindingHandle | The handle that DriverBinding is to be installed onto. If this parameter is NULL, then a new handle is created. |
ComponentName | A Component Name Protocol instance that this driver is producing. |
ComponentName2 | A Component Name 2 Protocol instance that this driver is producing. |
DriverConfiguration | A Driver Configuration Protocol instance that this driver is producing. |
DriverConfiguration2 | A Driver Configuration Protocol 2 instance that this driver is producing. |
DriverDiagnostics | A Driver Diagnostics Protocol instance that this driver is producing. |
DriverDiagnostics2 | A Driver Diagnostics Protocol 2 instance that this driver is producing. |
EFI_SUCCESS | The protocol installation successfully completed. |
EFI_OUT_OF_RESOURCES | There was not enough memory in pool to install all the protocols. |
Definition at line 586 of file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibInstallDriverBinding | ( | IN CONST EFI_HANDLE | ImageHandle, |
IN CONST EFI_SYSTEM_TABLE * | SystemTable, | ||
IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, | ||
IN EFI_HANDLE | DriverBindingHandle | ||
) |
Installs and completes the initialization of a Driver Binding Protocol instance.
Installs the Driver Binding Protocol specified by DriverBinding onto the handle specified by DriverBindingHandle. If DriverBindingHandle is NULL, then DriverBinding is installed onto a newly created handle. DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. If DriverBinding is NULL, then ASSERT(). If DriverBinding can not be installed onto a handle, then ASSERT().
ImageHandle | The image handle of the driver. |
SystemTable | The EFI System Table that was passed to the driver's entry point. |
DriverBinding | A Driver Binding Protocol instance that this driver is producing. |
DriverBindingHandle | The handle that DriverBinding is to be installed onto. If this parameter is NULL, then a new handle is created. |
EFI_SUCCESS | The protocol installation successfully completed. |
EFI_OUT_OF_RESOURCES | There was not enough system resources to install the protocol. |
Others | Status from gBS->InstallMultipleProtocolInterfaces(). |
Definition at line 37 of file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2 | ( | IN CONST EFI_HANDLE | ImageHandle, |
IN CONST EFI_SYSTEM_TABLE * | SystemTable, | ||
IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, | ||
IN EFI_HANDLE | DriverBindingHandle, | ||
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName | OPTIONAL, | ||
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 | OPTIONAL | ||
) |
Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.
Initializes a driver by installing the Driver Binding Protocol together with the optional Component Name and optional Component Name 2 protocols onto the driver's DriverBindingHandle. If DriverBindingHandle is NULL, then the protocols are installed onto a newly created handle. DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. If DriverBinding is NULL, then ASSERT(). If the installation fails, then ASSERT().
ImageHandle | The image handle of the driver. |
SystemTable | The EFI System Table that was passed to the driver's entry point. |
DriverBinding | A Driver Binding Protocol instance that this driver is producing. |
DriverBindingHandle | The handle that DriverBinding is to be installed onto. If this parameter is NULL, then a new handle is created. |
ComponentName | A Component Name Protocol instance that this driver is producing. |
ComponentName2 | A Component Name 2 Protocol instance that this driver is producing. |
EFI_SUCCESS | The protocol installation successfully completed. |
EFI_OUT_OF_RESOURCES | There was not enough memory in pool to install all the protocols. |
Definition at line 410 of file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibUninstallAllDriverProtocols | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, |
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName | OPTIONAL, | ||
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration | OPTIONAL, | ||
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics | OPTIONAL | ||
) |
Uninstalls a Driver Binding Protocol instance and optionally uninstalls the Component Name, Driver Configuration and Driver Diagnostics Protocols.
If DriverBinding is NULL, then ASSERT(). If the uninstallation fails, then ASSERT().
DriverBinding | A Driver Binding Protocol instance that this driver produced. |
ComponentName | A Component Name Protocol instance that this driver produced. |
DriverConfiguration | A Driver Configuration Protocol instance that this driver produced. |
DriverDiagnostics | A Driver Diagnostics Protocol instance that this driver produced. |
EFI_SUCCESS | The protocol uninstallation successfully completed. |
Others | Status from gBS->UninstallMultipleProtocolInterfaces(). |
Definition at line 272 of file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibUninstallAllDriverProtocols2 | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, |
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName | OPTIONAL, | ||
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 | OPTIONAL, | ||
IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration | OPTIONAL, | ||
IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 | OPTIONAL, | ||
IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics | OPTIONAL, | ||
IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 | OPTIONAL | ||
) |
Uninstalls Driver Binding Protocol with optional Component Name, Component Name 2, Driver Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.
If DriverBinding is NULL, then ASSERT(). If the installation fails, then ASSERT().
DriverBinding | A Driver Binding Protocol instance that this driver produced. |
ComponentName | A Component Name Protocol instance that this driver produced. |
ComponentName2 | A Component Name 2 Protocol instance that this driver produced. |
DriverConfiguration | A Driver Configuration Protocol instance that this driver produced. |
DriverConfiguration2 | A Driver Configuration Protocol 2 instance that this driver produced. |
DriverDiagnostics | A Driver Diagnostics Protocol instance that this driver produced. |
DriverDiagnostics2 | A Driver Diagnostics Protocol 2 instance that this driver produced. |
EFI_SUCCESS | The protocol uninstallation successfully completed. |
Others | Status from gBS->UninstallMultipleProtocolInterfaces(). |
Definition at line 1597 of file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibUninstallDriverBinding | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding | ) |
Uninstalls a Driver Binding Protocol instance.
If DriverBinding is NULL, then ASSERT(). If DriverBinding can not be uninstalled, then ASSERT().
DriverBinding | A Driver Binding Protocol instance that this driver produced. |
EFI_SUCCESS | The protocol uninstallation successfully completed. |
Others | Status from gBS->UninstallMultipleProtocolInterfaces(). |
Definition at line 82 of file UefiDriverModel.c.
EFI_STATUS EFIAPI EfiLibUninstallDriverBindingComponentName2 | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, |
IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName | OPTIONAL, | ||
IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 | OPTIONAL | ||
) |
Uninstalls Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.
If DriverBinding is NULL, then ASSERT(). If the uninstallation fails, then ASSERT().
DriverBinding | A Driver Binding Protocol instance that this driver produced. |
ComponentName | A Component Name Protocol instance that this driver produced. |
ComponentName2 | A Component Name 2 Protocol instance that this driver produced. |
EFI_SUCCESS | The protocol installation successfully completed. |
Others | Status from gBS->UninstallMultipleProtocolInterfaces(). |
Definition at line 495 of file UefiDriverModel.c.