]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c
Sync UefiLib instance in IntelFrameworkPkg with the one in MdePkg.
[mirror_edk2.git] / IntelFrameworkPkg / Library / FrameworkUefiLib / UefiDriverModel.c
index 19af4965c20830fa674ce5cb4bab4a4197a5d191..28037b605873ed1251b01b4e41e2b2210a33732d 100644 (file)
 \r
 **/ \r
 \r
-#include "FrameworkUefiLib.h"\r
+\r
+#include "UefiLibInternal.h"\r
 \r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol onto the driver's\r
-  DriverBindingHandle.  This is typically the same as the driver's ImageHandle, but\r
-  it can be different if the driver produces multiple DriverBinding Protocols. \r
-  If the Drvier Binding Protocol interface is NULL, then ASSERT (). \r
-  If the installation fails, then ASSERT ().\r
+  Installs and completes the initialization of a Driver Binding Protocol instance.\r
+  \r
+  Installs the Driver Binding Protocol specified by DriverBinding onto the handle\r
+  specified by DriverBindingHandle. If DriverBindingHandle is NULL, then DriverBinding\r
+  is installed onto a newly created handle. DriverBindingHandle is typically the same\r
+  as the driver's ImageHandle, but it can be different if the driver produces multiple\r
+  Driver Binding Protocols. \r
+  If DriverBinding is NULL, then ASSERT(). \r
+  If DriverBinding can not be installed onto a handle, then ASSERT().\r
 \r
-  @param  ImageHandle                 The image handle of the driver.\r
-  @param  SystemTable                 The EFI System Table that was passed to the driver's entry point.\r
-  @param  DriverBinding               A Driver Binding Protocol instance that this driver is producing.\r
-  @param  DriverBindingHandle         The handle that DriverBinding is to be installe onto.  If this\r
-                                      parameter is NULL, then a new handle is created.\r
+  @param  ImageHandle          The image handle of the driver.\r
+  @param  SystemTable          The EFI System Table that was passed to the driver's entry point.\r
+  @param  DriverBinding        A Driver Binding Protocol instance that this driver is producing.\r
+  @param  DriverBindingHandle  The handle that DriverBinding is to be installed onto.  If this\r
+                               parameter is NULL, then a new handle is created.\r
 \r
-  @retval EFI_SUCCESS                 The protocol installation is completed successfully.\r
-  @retval Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
+  @retval EFI_SUCCESS           The protocol installation is completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  There was not enough system resources to install the protocol.\r
+  @retval Others                Status from gBS->InstallMultipleProtocolInterfaces().\r
 \r
 **/\r
 EFI_STATUS\r
@@ -66,24 +72,29 @@ EfiLibInstallDriverBinding (
 \r
 \r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol together with the optional Component Name,\r
-  Driver Configure and Driver Diagnostic Protocols onto the driver's DriverBindingHandle.  This is\r
-  typically the same as the driver's ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols. \r
-  If the Drvier Binding Protocol interface is NULL, then ASSERT (). \r
-  If the installation fails, then ASSERT ().\r
+  Installs and completes the initialization of a Driver Binding Protocol instance and\r
+  optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols.\r
 \r
-  @param  ImageHandle                 The image handle of the driver.\r
-  @param  SystemTable                 The EFI System Table that was passed to the driver's entry point.\r
-  @param  DriverBinding               A Driver Binding Protocol instance that this driver is producing.\r
-  @param  DriverBindingHandle         The handle that DriverBinding is to be installe onto.  If this\r
-                                      parameter is NULL, then a new handle is created.\r
-  @param  ComponentName               A Component Name Protocol instance that this driver is producing.\r
-  @param  DriverConfiguration         A Driver Configuration Protocol instance that this driver is producing.\r
-  @param  DriverDiagnostics           A Driver Diagnostics Protocol instance that this driver is producing.\r
+  Initializes a driver by installing the Driver Binding Protocol together with the\r
+  optional Component Name, optional Driver Configure and optional Driver Diagnostic\r
+  Protocols onto the driver's DriverBindingHandle. If DriverBindingHandle is NULL,\r
+  then the protocols are  installed onto a newly created handle. DriverBindingHandle\r
+  is typically the same as the driver's ImageHandle, but it can be different if the\r
+  driver produces multiple Driver Binding Protocols. \r
+  If DriverBinding is NULL, then ASSERT(). \r
+  If the installation fails, then ASSERT().\r
+  \r
+  @param  ImageHandle          The image handle of the driver.\r
+  @param  SystemTable          The EFI System Table that was passed to the driver's entry point.\r
+  @param  DriverBinding        A Driver Binding Protocol instance that this driver is producing.\r
+  @param  DriverBindingHandle  The handle that DriverBinding is to be installed onto.  If this\r
+                               parameter is NULL, then a new handle is created.\r
+  @param  ComponentName        A Component Name Protocol instance that this driver is producing.\r
+  @param  DriverConfiguration  A Driver Configuration Protocol instance that this driver is producing.\r
+  @param  DriverDiagnostics    A Driver Diagnostics Protocol instance that this driver is producing.\r
 \r
-  @retval EFI_SUCCESS                 The protocol installation is completed successfully.\r
-  @retval Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
+  @retval EFI_SUCCESS           The protocol installation is completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  There was not enough memory in pool to install all the protocols.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -193,22 +204,26 @@ EfiLibInstallAllDriverProtocols (
 \r
 \r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol together with the optional Component Name,\r
-  Component Name 2 onto the driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple DriverBinding Protocols. \r
-  If the Drvier Binding Protocol interface is NULL, then ASSERT (). \r
-  If the installation fails, then ASSERT ().\r
+  Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols.\r
 \r
-  @param  ImageHandle                 The image handle of the driver.\r
-  @param  SystemTable                 The EFI System Table that was passed to the driver's entry point.\r
-  @param  DriverBinding               A Driver Binding Protocol instance that this driver is producing.\r
-  @param  DriverBindingHandle         The handle that DriverBinding is to be installe onto.  If this\r
-                                      parameter is NULL, then a new handle is created.\r
-  @param  ComponentName               A Component Name Protocol instance that this driver is producing.\r
-  @param  ComponentName2              A Component Name 2 Protocol instance that this driver is producing.\r
+  Initializes a driver by installing the Driver Binding Protocol together with the\r
+  optional Component Name and optional Component Name 2 protocols onto the driver's\r
+  DriverBindingHandle.  If DriverBindingHandle is NULL, then the protocols are installed\r
+  onto a newly created handle.  DriverBindingHandle is typically the same as the driver's\r
+  ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. \r
+  If DriverBinding is NULL, then ASSERT(). \r
+  If the installation fails, then ASSERT().\r
 \r
-  @retval EFI_SUCCESS                 The protocol installation is completed successfully.\r
-  @retval Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
+  @param  ImageHandle          The image handle of the driver.\r
+  @param  SystemTable          The EFI System Table that was passed to the driver's entry point.\r
+  @param  DriverBinding        A Driver Binding Protocol instance that this driver is producing.\r
+  @param  DriverBindingHandle  The handle that DriverBinding is to be installed onto.  If this\r
+                               parameter is NULL, then a new handle is created.\r
+  @param  ComponentName        A Component Name Protocol instance that this driver is producing.\r
+  @param  ComponentName2       A Component Name 2 Protocol instance that this driver is producing.\r
+\r
+  @retval EFI_SUCCESS           The protocol installation is completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  There was not enough memory in pool to install all the protocols.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -276,27 +291,31 @@ EfiLibInstallDriverBindingComponentName2 (
 \r
 \r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol together with the optional Component Name,\r
-  Component Name 2, Driver Configure, Driver Diagnostic and Driver Diagnostic 2 Protocols onto the driver's\r
-  DriverBindingHandle.  This is typically the same as the driver's ImageHandle, but it can be different if\r
-  the driver produces multiple DriverBinding Protocols. \r
-  If the Drvier Binding Protocol interface is NULL, then ASSERT (). \r
-  If the installation fails, then ASSERT ().\r
+  Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver\r
+  Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols.\r
+\r
+  Initializes a driver by installing the Driver Binding Protocol together with the optional\r
+  Component Name, optional Component Name 2, optional Driver Configuration, optional Driver\r
+  Configuration 2, optional Driver Diagnostic, and optional Driver Diagnostic 2 Protocols\r
+  onto the driver's DriverBindingHandle. DriverBindingHandle is typically the same as the\r
+  driver's ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. \r
+  If DriverBinding is NULL, then ASSERT(). \r
+  If the installation fails, then ASSERT().  \r
 \r
-  @param  ImageHandle                 The image handle of the driver.\r
-  @param  SystemTable                 The EFI System Table that was passed to the driver's entry point.\r
-  @param  DriverBinding               A Driver Binding Protocol instance that this driver is producing.\r
-  @param  DriverBindingHandle         The handle that DriverBinding is to be installe onto.  If this\r
-                                      parameter is NULL, then a new handle is created.\r
-  @param  ComponentName               A Component Name Protocol instance that this driver is producing.\r
-  @param  ComponentName2              A Component Name 2 Protocol instance that this driver is producing.\r
-  @param  DriverConfiguration         A Driver Configuration Protocol instance that this driver is producing.\r
-  @param  DriverConfiguration2        A Driver Configuration Protocol 2 instance that this driver is producing.\r
-  @param  DriverDiagnostics           A Driver Diagnostics Protocol instance that this driver is producing.\r
-  @param  DriverDiagnostics2          A Driver Diagnostics Protocol 2 instance that this driver is producing.\r
+  @param  ImageHandle           The image handle of the driver.\r
+  @param  SystemTable           The EFI System Table that was passed to the driver's entry point.\r
+  @param  DriverBinding         A Driver Binding Protocol instance that this driver is producing.\r
+  @param  DriverBindingHandle   The handle that DriverBinding is to be installe onto.  If this\r
+                                parameter is NULL, then a new handle is created.\r
+  @param  ComponentName         A Component Name Protocol instance that this driver is producing.\r
+  @param  ComponentName2        A Component Name 2 Protocol instance that this driver is producing.\r
+  @param  DriverConfiguration   A Driver Configuration Protocol instance that this driver is producing.\r
+  @param  DriverConfiguration2  A Driver Configuration Protocol 2 instance that this driver is producing.\r
+  @param  DriverDiagnostics     A Driver Diagnostics Protocol instance that this driver is producing.\r
+  @param  DriverDiagnostics2    A Driver Diagnostics Protocol 2 instance that this driver is producing.\r
 \r
-  @retval EFI_SUCCESS                 The protocol installation is completed successfully.\r
-  @retval Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
+  @retval EFI_SUCCESS           The protocol installation is completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  There was not enough memory in pool to install all the protocols.\r
 \r
 **/\r
 EFI_STATUS\r