]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Add EfiLibInstallDriverBindingComponentName2() to install DriverBinding Protocol...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 17 Sep 2007 03:39:25 +0000 (03:39 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 17 Sep 2007 03:39:25 +0000 (03:39 +0000)
2. Refine the function headers for this driver model APIs

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3862 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/UefiLib.h
MdePkg/Library/UefiLib/UefiDriverModel.c

index 874ad1f8c987d63ef99db6525c922ca3a4841a63..f097949629b93d4e25a38bba816352694f1df80e 100644 (file)
@@ -854,20 +854,20 @@ AsciiErrorPrint (
   );\r
 \r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol onto the\r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\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
 \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 installe onto.  If this\r
+                                      parameter is NULL, then a new handle is created.\r
 \r
-  @retval EFI_SUCCESS          DriverBinding is installed onto DriverBindingHandle\r
-  @retval Other                Status from gBS->InstallProtocolInterface()\r
+  @retval EFI_SUCCESS                 The protocol installation is completed successfully.\r
+  @retval Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
 \r
 **/\r
 EFI_STATUS\r
@@ -879,24 +879,26 @@ EfiLibInstallDriverBinding (
   IN EFI_HANDLE                   DriverBindingHandle\r
   );\r
 \r
-/**\r
-  Intialize a driver by installing the Driver Binding Protocol onto the\r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\r
-\r
-  @ImageHandle                 The image handle of the driver\r
-  @SystemTable                 The EFI System Table that was passed to the driver's entry point\r
-  @DriverBinding               A Driver Binding Protocol instance that this driver is producing\r
-  @DriverBindingHandle         The handle that DriverBinding is to be installe onto.  If this\r
-                               parameter is NULL, then a new handle is created.\r
-  @ComponentName               A Component Name Protocol instance that this driver is producing\r
-  @DriverConfiguration         A Driver Configuration Protocol instance that this driver is producing\r
-  @DriverDiagnostics           A Driver Diagnostics Protocol instance that this driver is producing\r
 \r
-  @retval EFI_SUCCESS          DriverBinding is installed onto DriverBindingHandle\r
-  @retval Other                Status from gBS->InstallProtocolInterface()\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
+\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
+\r
+  @retval EFI_SUCCESS                 The protocol installation is completed successfully.\r
+  @retval Others                      Status from gBS->InstallMultipleProtocolInterfaces().\r
 \r
 **/\r
 EFI_STATUS\r
@@ -912,51 +914,59 @@ EfiLibInstallAllDriverProtocols (
   );\r
 \r
 \r
+\r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol\r
-  onto the driver's DriverBindingHandle.  This is typically the\r
-  same as the driver's ImageHandle, but it can be different if\r
-  the driver produces multiple DriverBinding Protocols.  This\r
-  function also initializes the EFI Driver Library that\r
-  initializes the global variables gST, gBS, gRT.\r
-\r
-  @ImageHandle                  The image handle of the driver\r
-  \r
-  @SystemTable                  The EFI System Table that was\r
-                                passed to the driver's entry\r
-                                point\r
-  \r
-  @DriverBinding                A Driver Binding Protocol\r
-                                instance that this driver is\r
-                                producing\r
-  \r
-  @DriverBindingHandle          The handle that DriverBinding is\r
-                                to be installe onto.  If this\r
-                                parameter is NULL, then a new\r
-                                handle is created.\r
-  \r
-  @ComponentName                A Component Name Protocol\r
-                                instance that this driver is\r
-                                producing\r
-  \r
-  @ComponentName2               A Component Name 2 Protocol\r
-                                instance that this driver is\r
-                                producing\r
-  \r
-  @DriverConfiguration          A Driver Configuration Protocol\r
-                                instance that this driver is\r
-                                producing\r
-  \r
-  @DriverDiagnostics            A Driver Diagnostics Protocol\r
-                                instance that this driver is\r
-                                producing\r
-  \r
-  @DriverDiagnostics2           A Driver Diagnostics 2 Protocol\r
-                                instance that this driver is\r
-                                producing\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
+\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
 \r
-  @retval EFI_SUCCESS          DriverBinding is installed onto DriverBindingHandle\r
-  @retval Other                Status from gBS->InstallProtocolInterface()\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
+  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
+\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  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
@@ -973,5 +983,4 @@ EfiLibInstallAllDriverProtocols2 (
   IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL   *DriverDiagnostics2   OPTIONAL\r
   );\r
 \r
-\r
 #endif\r
index 0a72d263ad9138862feeb88f5c66d4ecf18e35f5..2153aad337446493844675ba182fb88dcc7fbef0 100644 (file)
 #include "UefiLibInternal.h"\r
 \r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol onto the\r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\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
 \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 installe onto.  If this\r
+                                      parameter is NULL, then a new handle is created.\r
 \r
-  @retval EFI_SUCCESS          DriverBinding is installed onto DriverBindingHandle\r
-  @retval Other                Status from gBS->InstallProtocolInterface()\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 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
@@ -67,36 +67,38 @@ EfiLibInstallDriverBinding (
   return Status;\r
 }\r
 \r
+\r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol onto the\r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\r
-\r
-  @ImageHandle                 The image handle of the driver\r
-  @SystemTable                 The EFI System Table that was passed to the driver's entry point\r
-  @DriverBinding               A Driver Binding Protocol instance that this driver is producing\r
-  @DriverBindingHandle         The handle that DriverBinding is to be installe onto.  If this\r
-                               parameter is NULL, then a new handle is created.\r
-  @ComponentName               A Component Name Protocol instance that this driver is producing\r
-  @DriverConfiguration         A Driver Configuration Protocol instance that this driver is producing\r
-  @DriverDiagnostics           A Driver Diagnostics Protocol instance that this driver is producing\r
-\r
-  @retval EFI_SUCCESS          DriverBinding is installed onto DriverBindingHandle\r
-  @retval Other                Status from gBS->InstallProtocolInterface()\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
+\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
+\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 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
+  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
   EFI_STATUS  Status;\r
@@ -192,38 +194,125 @@ EfiLibInstallAllDriverProtocols (
 }\r
 \r
 \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
+\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
+\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
+  EFI_STATUS  Status;\r
+\r
+  ASSERT (NULL != DriverBinding);\r
+\r
+  if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) {\r
+    if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r
+      Status = gBS->InstallMultipleProtocolInterfaces (\r
+                      &DriverBindingHandle,\r
+                      &gEfiDriverBindingProtocolGuid, DriverBinding,\r
+                      NULL\r
+                      );\r
+      } else {\r
+      Status = gBS->InstallMultipleProtocolInterfaces (\r
+                      &DriverBindingHandle,\r
+                      &gEfiDriverBindingProtocolGuid, DriverBinding,\r
+                      &gEfiComponentName2ProtocolGuid, ComponentName2,\r
+                      NULL\r
+                      );\r
+     }\r
+  } else {\r
+     if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) {\r
+       Status = gBS->InstallMultipleProtocolInterfaces (\r
+                       &DriverBindingHandle,\r
+                       &gEfiDriverBindingProtocolGuid, DriverBinding,\r
+                       &gEfiComponentNameProtocolGuid, ComponentName,\r
+                       NULL\r
+                       );\r
+     } else {\r
+       Status = gBS->InstallMultipleProtocolInterfaces (\r
+                       &DriverBindingHandle,\r
+                       &gEfiDriverBindingProtocolGuid, DriverBinding,\r
+                       &gEfiComponentNameProtocolGuid, ComponentName,\r
+                       &gEfiComponentName2ProtocolGuid, ComponentName2,\r
+                       NULL\r
+                       );\r
+    }\r
+  }\r
+  //\r
+  // ASSERT if the call to InstallMultipleProtocolInterfaces() failed\r
+  //\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Update the ImageHandle and DriverBindingHandle fields of the Driver Binding Protocol\r
+  //\r
+  DriverBinding->ImageHandle         = ImageHandle;\r
+  DriverBinding->DriverBindingHandle = DriverBindingHandle;\r
+\r
+  return Status;\r
+}\r
+\r
+\r
+\r
 /**\r
-  Intialize a driver by installing the Driver Binding Protocol onto the\r
-  driver's DriverBindingHandle.  This is typically the same as the driver's\r
-  ImageHandle, but it can be different if the driver produces multiple\r
-  DriverBinding Protocols.  This function also initializes the EFI Driver\r
-  Library that initializes the global variables gST, gBS, gRT.\r
-\r
-  @ImageHandle                 The image handle of the driver\r
-  @SystemTable                 The EFI System Table that was passed to the driver's entry point\r
-  @DriverBinding               A Driver Binding Protocol instance that this driver is producing\r
-  @DriverBindingHandle         The handle that DriverBinding is to be installe onto.  If this\r
-                               parameter is NULL, then a new handle is created.\r
-  @ComponentName               A Component Name Protocol instance that this driver is producing\r
-  @DriverConfiguration         A Driver Configuration Protocol instance that this driver is producing\r
-  @DriverDiagnostics           A Driver Diagnostics Protocol instance that this driver is producing\r
-\r
-  @retval EFI_SUCCESS          DriverBinding is installed onto DriverBindingHandle\r
-  @retval Other                Status from gBS->InstallProtocolInterface()\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
+\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  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 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
+  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
   EFI_STATUS  Status;\r