]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/UefiLib.h
clean up the un-suitable ';' location when declaring the functions.
[mirror_edk2.git] / MdePkg / Include / Library / UefiLib.h
index 9eed35ba1631f2301415ec4305df3dd975314283..13ab258ebe509bead04232923354bd3569effd9f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   MDE UEFI library functions and macros\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
 #ifndef __UEFI_LIB_H__\r
 #define __UEFI_LIB_H__\r
 \r
-//\r
-// Unicode String Table\r
-//\r
+#include <Protocol/DriverBinding.h>\r
+#include <Protocol/DriverConfiguration.h>\r
+#include <Protocol/ComponentName.h>\r
+#include <Protocol/ComponentName2.h>\r
+#include <Protocol/DriverDiagnostics.h>\r
+#include <Protocol/DriverDiagnostics2.h>\r
+\r
+///\r
+/// Unicode String Table\r
+///\r
 typedef struct {\r
   CHAR8   *Language;\r
   CHAR16  *UnicodeString;\r
 } EFI_UNICODE_STRING_TABLE;\r
 \r
-//\r
-// EFI Lock Status\r
-//\r
+///\r
+/// EFI Lock Status\r
+///\r
 typedef enum {\r
   EfiLockUninitialized = 0,\r
   EfiLockReleased      = 1,\r
   EfiLockAcquired      = 2\r
 } EFI_LOCK_STATE;\r
 \r
-//\r
-// EFI Lock \r
-//\r
+///\r
+/// EFI Lock \r
+///\r
 typedef struct {\r
   EFI_TPL         Tpl;\r
   EFI_TPL         OwnerTpl;\r
@@ -128,6 +135,24 @@ EfiNamedEventSignal (
   IN CONST EFI_GUID  *Name\r
   );\r
 \r
+/** \r
+  Returns the current TPL.\r
+\r
+  This function returns the current TPL.  There is no EFI service to directly \r
+  retrieve the current TPL. Instead, the RaiseTPL() function is used to raise \r
+  the TPL to TPL_HIGH_LEVEL.  This will return the current TPL.  The TPL level \r
+  can then immediately be restored back to the current TPL level with a call \r
+  to RestoreTPL().\r
+\r
+  @return The current TPL.\r
+\r
+**/\r
+EFI_TPL\r
+EFIAPI\r
+EfiGetCurrentTpl (\r
+  VOID\r
+  );\r
+\r
 /**\r
   This function initializes a basic mutual exclusion lock to the released state \r
   and returns the lock.  Each lock provides mutual exclusion access at its task \r
@@ -153,14 +178,13 @@ EfiInitializeLock (
   priority level.  Since there is no preemption or multiprocessor support in EFI,\r
   acquiring the lock only consists of raising to the locks TPL.\r
 \r
-  @param  Lock      A pointer to the lock data structure to initialize.\r
   @param  Priority  The task priority level of the lock.\r
 \r
   @return The lock.\r
 \r
 **/\r
 #define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \\r
-  {Priority, EFI_TPL_APPLICATION, EfiLockReleased }\r
+  {Priority, TPL_APPLICATION, EfiLockReleased }\r
 \r
 \r
 /**\r
@@ -193,7 +217,7 @@ EfiInitializeLock (
   priority level of the mutual exclusion lock.  Then, it places the lock in the \r
   acquired state.\r
 \r
-  @param  Priority  The task priority level of the lock.\r
+  @param  Lock              A pointer to the lock to acquire.\r
 \r
 **/\r
 VOID\r
@@ -233,6 +257,64 @@ EfiReleaseLock (
   IN EFI_LOCK  *Lock\r
   );\r
 \r
+/**\r
+  Tests whether a controller handle is being managed by a specific driver.\r
+\r
+  This function tests whether the driver specified by DriverBindingHandle is\r
+  currently managing the controller specified by ControllerHandle.  This test\r
+  is performed by evaluating if the the protocol specified by ProtocolGuid is\r
+  present on ControllerHandle and is was opened by DriverBindingHandle with an\r
+  attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. \r
+  If ProtocolGuid is NULL, then ASSERT().\r
+\r
+  @param  ControllerHandle     A handle for a controller to test.\r
+  @param  DriverBindingHandle  Specifies the driver binding handle for the\r
+                               driver.\r
+  @param  ProtocolGuid         Specifies the protocol that the driver specified\r
+                               by DriverBindingHandle opens in its Start()\r
+                               function.\r
+\r
+  @retval EFI_SUCCESS          ControllerHandle is managed by the driver\r
+                               specifed by DriverBindingHandle.\r
+  @retval EFI_UNSUPPORTED      ControllerHandle is not managed by the driver\r
+                               specifed by DriverBindingHandle.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiTestManagedDevice (\r
+  IN CONST EFI_HANDLE       ControllerHandle,\r
+  IN CONST EFI_HANDLE       DriverBindingHandle,\r
+  IN CONST EFI_GUID         *ProtocolGuid\r
+  );\r
+\r
+/**\r
+  Tests whether a child handle is a child device of the controller.\r
+\r
+  This function tests whether ChildHandle is one of the children of\r
+  ControllerHandle.  This test is performed by checking to see if the protocol\r
+  specified by ProtocolGuid is present on ControllerHandle and opened by\r
+  ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r
+  If ProtocolGuid is NULL, then ASSERT().\r
+\r
+  @param  ControllerHandle     A handle for a (parent) controller to test. \r
+  @param  ChildHandle          A child handle to test.\r
+  @param  ProtocolGuid         Supplies the protocol that the child controller\r
+                               opens on its parent controller. \r
+\r
+  @retval EFI_SUCCESS          ChildHandle is a child of the ControllerHandle.\r
+  @retval EFI_UNSUPPORTED      ChildHandle is not a child of the\r
+                               ControllerHandle.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiTestChildHandle (\r
+  IN CONST EFI_HANDLE       ControllerHandle,\r
+  IN CONST EFI_HANDLE       ChildHandle,\r
+  IN CONST EFI_GUID         *ProtocolGuid\r
+  );\r
+\r
 /**\r
   This function looks up a Unicode string in UnicodeStringTable.  If Language is \r
   a member of SupportedLanguages and a Unicode string is found in UnicodeStringTable\r
@@ -271,6 +353,72 @@ LookupUnicodeString (
   OUT CHAR16                         **UnicodeString\r
   );\r
 \r
+/**\r
+  This function looks up a Unicode string in UnicodeStringTable.\r
+  If Language is a member of SupportedLanguages and a Unicode\r
+  string is found in UnicodeStringTable that matches the\r
+  language code specified by Language, then it is returned in\r
+  UnicodeString.\r
+\r
+  @param  Language                A pointer to the ISO 639-2 or\r
+                                  RFC 3066 language code for the\r
+                                  Unicode string to look up and\r
+                                  return.\r
+  \r
+  @param  SupportedLanguages      A pointer to the set of ISO\r
+                                  639-2 or RFC 3066 language\r
+                                  codes that the Unicode string\r
+                                  table supports. Language must\r
+                                  be a member of this set.\r
+  \r
+  @param  UnicodeStringTable      A pointer to the table of\r
+                                  Unicode strings.\r
+  \r
+  @param  UnicodeString           A pointer to the Unicode\r
+                                  string from UnicodeStringTable\r
+                                  that matches the language\r
+                                  specified by Language.\r
+\r
+  @param  Iso639Language          Specify the language code\r
+                                  format supported. If true,\r
+                                  then the format follow ISO\r
+                                  639-2. If false, then it\r
+                                  follows RFC3066.\r
+\r
+  @retval  EFI_SUCCESS            The Unicode string that\r
+                                  matches the language specified\r
+                                  by Language was found in the\r
+                                  table of Unicoide strings\r
+                                  UnicodeStringTable, and it was\r
+                                  returned in UnicodeString.\r
+  \r
+  @retval  EFI_INVALID_PARAMETER  Language is NULL.\r
+  \r
+  @retval  EFI_INVALID_PARAMETER  UnicodeString is NULL.\r
+  \r
+  @retval  EFI_UNSUPPORTED        SupportedLanguages is NULL.\r
+  \r
+  @retval  EFI_UNSUPPORTED        UnicodeStringTable is NULL.\r
+  \r
+  @retval  EFI_UNSUPPORTED        The language specified by\r
+                                  Language is not a member\r
+                                  ofSupportedLanguages.\r
+  \r
+  @retval EFI_UNSUPPORTED         The language specified by\r
+                                  Language is not supported by\r
+                                  UnicodeStringTable.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+LookupUnicodeString2 (\r
+  IN CONST CHAR8                     *Language,\r
+  IN CONST CHAR8                     *SupportedLanguages,\r
+  IN CONST EFI_UNICODE_STRING_TABLE  *UnicodeStringTable,\r
+  OUT CHAR16                         **UnicodeString,\r
+  IN BOOLEAN                         Iso639Language\r
+  );\r
+\r
 /**\r
   This function adds a Unicode string to UnicodeStringTable.\r
   If Language is a member of SupportedLanguages then UnicodeString is added to \r
@@ -312,6 +460,76 @@ AddUnicodeString (
   IN CONST CHAR16              *UnicodeString\r
   );\r
 \r
+/**\r
+  \r
+  This function adds a Unicode string to UnicodeStringTable.\r
+  If Language is a member of SupportedLanguages then\r
+  UnicodeString is added to UnicodeStringTable.  New buffers are\r
+  allocated for both Language and UnicodeString.  The contents\r
+  of Language and UnicodeString are copied into these new\r
+  buffers.  These buffers are automatically freed when\r
+  FreeUnicodeStringTable() is called.\r
+\r
+  @param  Language                A pointer to the ISO 639-2 or\r
+                                  RFC 3066 language code for the\r
+                                  Unicode string to add.\r
+  \r
+  @param  SupportedLanguages      A pointer to the set of ISO\r
+                                  639-2 or RFC 3066 language\r
+                                  codes that the Unicode string\r
+                                  table supports. Language must\r
+                                  be a member of this set.\r
+  \r
+  @param  UnicodeStringTable      A pointer to the table of\r
+                                  Unicode strings.\r
+  \r
+  @param  UnicodeString           A pointer to the Unicode\r
+                                  string to add.\r
+  \r
+  @param  Iso639Language          Specify the language code\r
+                                  format supported. If true,\r
+                                  then the format follow ISO\r
+                                  639-2. If false, then it\r
+                                  follows RFC3066.\r
+\r
+  @retval EFI_SUCCESS             The Unicode string that\r
+                                  matches the language specified\r
+                                  by Language was found in the\r
+                                  table of Unicode strings\r
+                                  UnicodeStringTable, and it was\r
+                                  returned in UnicodeString.\r
+  \r
+  @retval EFI_INVALID_PARAMETER   Language is NULL.\r
+  \r
+  @retval EFI_INVALID_PARAMETER   UnicodeString is NULL.\r
+  \r
+  @retval EFI_INVALID_PARAMETER   UnicodeString is an empty string.\r
+  \r
+  @retval EFI_UNSUPPORTED         SupportedLanguages is NULL.\r
+  \r
+  @retval EFI_ALREADY_STARTED     A Unicode string with language\r
+                                  Language is already present in\r
+                                  UnicodeStringTable.\r
+  \r
+  @retval EFI_OUT_OF_RESOURCES    There is not enough memory to\r
+                                  add another Unicode string to\r
+                                  UnicodeStringTable.\r
+  \r
+  @retval EFI_UNSUPPORTED         The language specified by\r
+                                  Language is not a member of\r
+                                  SupportedLanguages.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+AddUnicodeString2 (\r
+  IN CONST CHAR8               *Language,\r
+  IN CONST CHAR8               *SupportedLanguages,\r
+  IN EFI_UNICODE_STRING_TABLE  **UnicodeStringTable,\r
+  IN CONST CHAR16              *UnicodeString,\r
+  IN BOOLEAN                   Iso639Language\r
+  );\r
+\r
 /**\r
   This function frees the table of Unicode strings in UnicodeStringTable.\r
   If UnicodeStringTable is NULL, then EFI_SUCCESS is returned.\r
@@ -453,7 +671,7 @@ EfiCreateEventLegacyBootEx (
   the EDK/EFI 1.10 form and EDKII/UEFI 2.0 form and allows common code to \r
   work both ways.\r
 \r
-  @param  LegacyBootEvent   Returns the EFI event returned from gBS->CreateEvent(Ex).\r
+  @param  ReadyToBootEvent   Returns the EFI event returned from gBS->CreateEvent(Ex).\r
 \r
   @retval EFI_SUCCESS       Event was created.\r
   @retval Other             Event was not created.\r
@@ -478,7 +696,7 @@ EfiCreateEventReadyToBoot (
   @param  NotifyTpl         The task priority level of the event.\r
   @param  NotifyFunction    The notification function to call when the event is signaled.\r
   @param  NotifyContext     The content to pass to NotifyFunction when the event is signaled.\r
-  @param  LegacyBootEvent   Returns the EFI event returned from gBS->CreateEvent(Ex).\r
+  @param  ReadyToBootEvent  Returns the EFI event returned from gBS->CreateEvent(Ex).\r
 \r
   @retval EFI_SUCCESS       Event was created.\r
   @retval Other             Event was not created.\r
@@ -538,5 +756,234 @@ EfiGetNameGuidFromFwVolDevicePathNode (
   IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH  *FvDevicePathNode\r
   );\r
 \r
+/** \r
+  Prints a formatted Unicode string to the console output device specified by \r
+  ConOut defined in the EFI_SYSTEM_TABLE.\r
+\r
+  This function prints a formatted Unicode string to the console output device \r
+  specified by ConOut in EFI_SYSTEM_TABLE and returns the number of Unicode \r
+  characters that printed to ConOut.  If the length of the formatted Unicode \r
+  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first \r
+  PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.\r
+\r
+  @param Format   Null-terminated Unicode format string.\r
+  @param ...      VARARG list consumed to process Format.\r
+  If Format is NULL, then ASSERT().\r
+  If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+  \r
+  @return Number of Unicode characters printed to ConOut.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+Print (\r
+  IN CONST CHAR16  *Format,\r
+  ...\r
+  );\r
+\r
+/** \r
+  Prints a formatted Unicode string to the console output device specified by \r
+  StdErr defined in the EFI_SYSTEM_TABLE.\r
+\r
+  This function prints a formatted Unicode string to the console output device \r
+  specified by StdErr in EFI_SYSTEM_TABLE and returns the number of Unicode \r
+  characters that printed to StdErr.  If the length of the formatted Unicode \r
+  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first \r
+  PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.\r
+\r
+  @param Format   Null-terminated Unicode format string.\r
+  @param ...      VARARG list consumed to process Format.\r
+  If Format is NULL, then ASSERT().\r
+  If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+  \r
+  @return Number of Unicode characters printed to StdErr.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+ErrorPrint (\r
+  IN CONST CHAR16  *Format,\r
+  ...\r
+  );\r
+\r
+/** \r
+  Prints a formatted ASCII string to the console output device specified by \r
+  ConOut defined in the EFI_SYSTEM_TABLE.\r
+\r
+  This function prints a formatted ASCII string to the console output device \r
+  specified by ConOut in EFI_SYSTEM_TABLE and returns the number of ASCII \r
+  characters that printed to ConOut.  If the length of the formatted ASCII \r
+  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first \r
+  PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.\r
+\r
+  @param Format   Null-terminated ASCII format string.\r
+  @param ...      VARARG list consumed to process Format.\r
+  If Format is NULL, then ASSERT().\r
+  If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+  \r
+  @return Number of ASCII characters printed to ConOut.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+AsciiPrint (\r
+  IN CONST CHAR8  *Format,\r
+  ...\r
+  );\r
+\r
+/** \r
+  Prints a formatted ASCII string to the console output device specified by \r
+  StdErr defined in the EFI_SYSTEM_TABLE.\r
+\r
+  This function prints a formatted ASCII string to the console output device \r
+  specified by StdErr in EFI_SYSTEM_TABLE and returns the number of ASCII \r
+  characters that printed to StdErr.  If the length of the formatted ASCII \r
+  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first \r
+  PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.\r
+\r
+  @param Format   Null-terminated ASCII format string.\r
+  @param ...      VARARG list consumed to process Format.\r
+  If Format is NULL, then ASSERT().\r
+  If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+  \r
+  @return Number of ASCII characters printed to ConErr.\r
+\r
+**/\r
+UINTN\r
+EFIAPI\r
+AsciiErrorPrint (\r
+  IN CONST CHAR8  *Format,\r
+  ...\r
+  );\r
+\r
+/**\r
+  Initializes 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 Driver Binding Protocol interface 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
+\r
+  @retval EFI_SUCCESS                 The protocol installation is completed successfully.\r
+  @retval Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibInstallDriverBinding (\r
+  IN CONST EFI_HANDLE             ImageHandle,\r
+  IN CONST EFI_SYSTEM_TABLE       *SystemTable,\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *DriverBinding,\r
+  IN EFI_HANDLE                   DriverBindingHandle\r
+  );\r
+\r
+\r
+/**\r
+  Initializes 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 Driver Binding Protocol interface 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
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibInstallAllDriverProtocols (\r
+  IN CONST EFI_HANDLE                         ImageHandle,\r
+  IN CONST EFI_SYSTEM_TABLE                   *SystemTable,\r
+  IN EFI_DRIVER_BINDING_PROTOCOL              *DriverBinding,\r
+  IN EFI_HANDLE                               DriverBindingHandle,\r
+  IN CONST EFI_COMPONENT_NAME_PROTOCOL        *ComponentName,       OPTIONAL\r
+  IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL  *DriverConfiguration, OPTIONAL\r
+  IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL    *DriverDiagnostics    OPTIONAL\r
+  );\r
+\r
+\r
+\r
+/**\r
+  Initializes 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 Driver Binding Protocol interface 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  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 Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibInstallDriverBindingComponentName2 (\r
+  IN CONST EFI_HANDLE                         ImageHandle,\r
+  IN CONST EFI_SYSTEM_TABLE                   *SystemTable,\r
+  IN EFI_DRIVER_BINDING_PROTOCOL              *DriverBinding,\r
+  IN EFI_HANDLE                               DriverBindingHandle,\r
+  IN CONST EFI_COMPONENT_NAME_PROTOCOL        *ComponentName,       OPTIONAL\r
+  IN CONST EFI_COMPONENT_NAME2_PROTOCOL       *ComponentName2       OPTIONAL\r
+  );\r
+\r
+\r
+/**\r
+  Initializes 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 Driver Binding Protocol interface 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  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  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
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EfiLibInstallAllDriverProtocols2 (\r
+  IN CONST EFI_HANDLE                         ImageHandle,\r
+  IN CONST EFI_SYSTEM_TABLE                   *SystemTable,\r
+  IN EFI_DRIVER_BINDING_PROTOCOL              *DriverBinding,\r
+  IN EFI_HANDLE                               DriverBindingHandle,\r
+  IN CONST EFI_COMPONENT_NAME_PROTOCOL        *ComponentName,       OPTIONAL\r
+  IN CONST EFI_COMPONENT_NAME2_PROTOCOL       *ComponentName2,      OPTIONAL\r
+  IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL  *DriverConfiguration, OPTIONAL\r
+  IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL    *DriverDiagnostics,   OPTIONAL\r
+  IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL   *DriverDiagnostics2   OPTIONAL\r
+  );\r
 \r
 #endif\r