]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/PlatDriOverLib.h
Code Clean for Driver PlatformDriOverrideDxe and PlatOverMngr application. And Clean...
[mirror_edk2.git] / MdeModulePkg / Include / Library / PlatDriOverLib.h
index d49d66da2c3886d0af97220d50979ff7738a50f7..8ca8b9283934bb182696d62c206ef4f741fa62da 100644 (file)
@@ -16,30 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef _PLAT_DRI_OVER_LIB_H_\r
 #define _PLAT_DRI_OVER_LIB_H_\r
 \r
-#include <Protocol/PlatformDriverOverride.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Protocol/DriverBinding.h>\r
-#include <Library/BaseLib.h>\r
-\r
-#include <VariableFormat.h>\r
-\r
-/**\r
-  Install the Platform Driver Override Protocol, and ensure there is only one Platform Driver Override Protocol\r
-  in the system.\r
-\r
-  @param  gPlatformDriverOverride  PlatformDriverOverride protocol interface which\r
-                                   needs to be installed\r
-\r
-  @retval EFI_ALREADY_STARTED      There has been a Platform Driver Override\r
-                                   Protocol in the system, cannot install it again.\r
-  @retval EFI_SUCCESS              The protocol is installed successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-InstallPlatformDriverOverrideProtocol (\r
-  EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *gPlatformDriverOverride\r
-  );\r
 \r
 /**\r
   Free all the mapping database memory resource and initialize the mapping list entry.\r
@@ -57,8 +34,8 @@ FreeMappingDatabase (
   );\r
 \r
 /**\r
-  Read the environment variable(s) that contain the override mappings from Controller Device Path to\r
-  a set of Driver Device Paths, and create the mapping database in memory with those variable info.\r
+  Read the NV environment variable(s) that contain the override mappings from Controller Device Path to\r
+  a set of Driver Device Paths, and create the mapping database in memory to contain these variable info.\r
 \r
   @param  MappingDataBase          Mapping database list entry pointer\r
 \r
@@ -76,6 +53,7 @@ InitOverridesMapping (
 \r
 /**\r
   Save the memory mapping database into NV environment variable(s).\r
+  If MappingDataBase list is empty, then delete all platform override NV variables.\r
 \r
   @param  MappingDataBase          Mapping database list entry pointer\r
 \r
@@ -92,7 +70,6 @@ SaveOverridesMapping (
 /**\r
   Retrieves the image handle of the platform override driver for a controller in the system from the memory mapping database.\r
 \r
-  @param  This                     A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.\r
   @param  ControllerHandle         The device handle of the controller to check if\r
                                    a driver override exists.\r
   @param  DriverImageHandle        On output, a pointer to the next driver handle.\r
@@ -117,27 +94,14 @@ SaveOverridesMapping (
 EFI_STATUS\r
 EFIAPI\r
 GetDriverFromMapping (\r
-  IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL              * This,\r
   IN     EFI_HANDLE                                     ControllerHandle,\r
-  IN OUT EFI_HANDLE                                     * DriverImageHandle,\r
-  IN     LIST_ENTRY                                     * MappingDataBase,\r
+  IN OUT EFI_HANDLE                                     *DriverImageHandle,\r
+  IN     LIST_ENTRY                                     *MappingDataBase,\r
   IN     EFI_HANDLE                                     CallerImageHandle\r
   );\r
 \r
 /**\r
-  Deletes all environment variable(s) that contain the override mappings from Controller Device Path to\r
-  a set of Driver Device Paths.\r
-\r
-  @retval EFI_SUCCESS  Delete all variable(s) successfully.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-DeleteOverridesVariables (\r
-  VOID\r
-  );\r
-\r
-/**\r
-  Check mapping database whether already has the  mapping info which\r
+  Check mapping database whether already has the mapping info which\r
   records the input Controller to input DriverImage.\r
 \r
   @param  ControllerDevicePath     The controller device path is to be check.\r
@@ -214,22 +178,4 @@ DeleteDriverImage (
   IN     LIST_ENTRY                                     *MappingDataBase\r
   );\r
 \r
-/**\r
-  Get the first Binding protocol which has the specific image handle\r
-\r
-  @param  ImageHandle          The Image handle\r
-  @param  BindingHandle        The BindingHandle of the found Driver Binding protocol.\r
-                               If Binding protocol is not found, it is set to NULL. \r
-\r
-  @return                      Pointer into the Binding Protocol interface\r
-  @retval NULL                 The parameter is not valid or the binding protocol is not found.\r
-\r
-**/\r
-EFI_DRIVER_BINDING_PROTOCOL *\r
-EFIAPI\r
-GetBindingProtocolFromImageHandle (\r
-  IN  EFI_HANDLE   ImageHandle,\r
-  OUT EFI_HANDLE   *BindingHandle\r
-  );\r
-\r
 #endif\r