]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiDriverLib.h
Some adjustment in ECP to make it compatible with EDK1.01(EDK1117) foundation in...
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / Include / EfiDriverLib.h
index 03e660b247a28bd845d848c5c00e5a62a5ab7c0d..67110fff7814fe452fc4e65bbe5e71a48f1e043a 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2008, 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
@@ -28,6 +28,7 @@ Abstract:
 #include "LinkedList.h"\r
 #include "GetImage.h"\r
 #include "EfiImageFormat.h"\r
+#include "EfiCompNameSupport.h"\r
 \r
 #include EFI_GUID_DEFINITION (DxeServices)\r
 #include EFI_GUID_DEFINITION (EventGroup)\r
@@ -40,7 +41,9 @@ Abstract:
 #include EFI_PROTOCOL_DEFINITION (ComponentName)\r
 #include EFI_PROTOCOL_DEFINITION (ComponentName2)\r
 #include EFI_PROTOCOL_DEFINITION (DriverConfiguration)\r
+#include EFI_PROTOCOL_DEFINITION (DriverConfiguration2)\r
 #include EFI_PROTOCOL_DEFINITION (DriverDiagnostics)\r
+#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics2)\r
 \r
 #include EFI_PROTOCOL_DEFINITION (DebugMask)\r
 \r
@@ -166,13 +169,9 @@ EfiLibInstallAllDriverProtocols (
   IN EFI_SYSTEM_TABLE                   *SystemTable,\r
   IN EFI_DRIVER_BINDING_PROTOCOL        *DriverBinding,\r
   IN EFI_HANDLE                         DriverBindingHandle,\r
-#if (EFI_SPECIFICATION_VERSION >= 0x00020000)\r
-  IN EFI_COMPONENT_NAME2_PROTOCOL       *ComponentName,\r
-#else\r
-  IN EFI_COMPONENT_NAME_PROTOCOL        *ComponentName,\r
-#endif\r
-  IN EFI_DRIVER_CONFIGURATION_PROTOCOL  *DriverConfiguration,\r
-  IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL    *DriverDiagnostics\r
+  IN EFI_COMPONENT_NAME_PROTOCOL        *ComponentName, OPTIONAL\r
+  IN EFI_DRIVER_CONFIGURATION_PROTOCOL  *DriverConfiguration, OPTIONAL\r
+  IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL    *DriverDiagnostics OPTIONAL\r
   )\r
 /*++\r
 \r
@@ -210,6 +209,52 @@ Returns:
 --*/\r
 ;\r
 \r
+EFI_STATUS\r
+EfiLibInstallAllDriverProtocols2 (\r
+  IN EFI_HANDLE                         ImageHandle,\r
+  IN EFI_SYSTEM_TABLE                   *SystemTable,\r
+  IN EFI_DRIVER_BINDING_PROTOCOL        *DriverBinding,\r
+  IN EFI_HANDLE                         DriverBindingHandle,\r
+  IN EFI_COMPONENT_NAME2_PROTOCOL       *ComponentName2, OPTIONAL\r
+  IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2, OPTIONAL\r
+  IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL   *DriverDiagnostics2 OPTIONAL\r
+  )\r
+/*++\r
+\r
+Routine Description:\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
+Arguments:\r
+\r
+  ImageHandle         - The image handle of the driver\r
+\r
+  SystemTable         - The EFI System Table that was passed to the driver's entry point\r
+\r
+  DriverBinding       - A Driver Binding Protocol instance that this driver is producing\r
+\r
+  DriverBindingHandle - The handle that DriverBinding is to be installe onto.  If this\r
+                        parameter is NULL, then a new handle is created.\r
+\r
+  ComponentName2      - A Component Name2 Protocol instance that this driver is producing\r
+\r
+  DriverConfiguration2- A Driver Configuration2 Protocol instance that this driver is producing\r
+  \r
+  DriverDiagnostics2  - A Driver Diagnostics2 Protocol instance that this driver is producing\r
+\r
+Returns: \r
+\r
+  EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle\r
+\r
+  Otherwise, then return status from gBS->InstallProtocolInterface()\r
+\r
+--*/\r
+;\r
+\r
 EFI_STATUS\r
 EfiLibGetSystemConfigurationTable (\r
   IN EFI_GUID *TableGuid,\r