]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OldMdePkg/Include/Protocol/PlatformDriverOverride.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / Protocol / PlatformDriverOverride.h
diff --git a/OldMdePkg/Include/Protocol/PlatformDriverOverride.h b/OldMdePkg/Include/Protocol/PlatformDriverOverride.h
new file mode 100644 (file)
index 0000000..1015c50
--- /dev/null
@@ -0,0 +1,135 @@
+/** @file\r
+  Platform Driver Override protocol as defined in the EFI 1.1 specification.\r
+\r
+  Copyright (c) 2006, 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
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name:  PlatformDriverOverride.h\r
+\r
+**/\r
+\r
+#ifndef __EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H__\r
+#define __EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H__\r
+\r
+//\r
+// Global ID for the Platform Driver Override Protocol\r
+//\r
+#define EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID \\r
+  { \\r
+    0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
+  }\r
+\r
+typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL  EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL;\r
+\r
+//\r
+// Prototypes for the Platform Driver Override Protocol\r
+//\r
+\r
+/**                                                                 \r
+  Retrieves the image handle of the platform override driver for a controller in the system.\r
+    \r
+  @param  This                  A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_\r
+                                PROTOCOL instance.                            \r
+  @param  ControllerHandle      The device handle of the controller to check if a driver override\r
+                                exists.                                                          \r
+  @param  DriverImageHandle     On input, a pointer to the previous driver image handle returned\r
+                                by GetDriver(). On output, a pointer to the next driver         \r
+                                image handle.                                                   \r
+                                \r
+  @retval EFI_SUCCESS           The driver override for ControllerHandle was returned in\r
+                                DriverImageHandle.                                      \r
+  @retval EFI_NOT_FOUND         A driver override for ControllerHandle was not found.\r
+  @retval EFI_INVALID_PARAMETER The handle specified by ControllerHandle is not a valid handle.\r
+  @retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a\r
+                                previous call to GetDriver().                           \r
+                                   \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER) (\r
+  IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL              *This,\r
+  IN     EFI_HANDLE                                     ControllerHandle,\r
+  IN OUT EFI_HANDLE                                     *DriverImageHandle\r
+  );\r
+\r
+/**                                                                 \r
+  Retrieves the device path of the platform override driver for a controller in the system.\r
+    \r
+  @param  This                  A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_\r
+                                PROTOCOL instance.                            \r
+  @param  ControllerHandle      The device handle of the controller to check if a driver override\r
+                                exists.                                                          \r
+  @param  DriverImageHandle     On input, a pointer to the previous driver image handle returned\r
+                                by GetDriverPath(). On output, a pointer to the next driver         \r
+                                device path.\r
+                                \r
+  @retval EFI_SUCCESS           The driver override for ControllerHandle was returned in\r
+                                DriverImageHandle.                                      \r
+  @retval EFI_UNSUPPORTED       The operation is not supported.                                \r
+  @retval EFI_NOT_FOUND         A driver override for ControllerHandle was not found.\r
+  @retval EFI_INVALID_PARAMETER The handle specified by ControllerHandle is not a valid handle.\r
+  @retval EFI_INVALID_PARAMETER DriverImagePath is not a device path that was returned on a\r
+                                previous call to GetDriverPath().                          \r
+                                   \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH) (\r
+  IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL              *This,\r
+  IN     EFI_HANDLE                                     ControllerHandle,\r
+  IN OUT EFI_DEVICE_PATH_PROTOCOL                       **DriverImagePath\r
+  );\r
+\r
+/**                                                                 \r
+  Used to associate a driver image handle with a device path that was returned on a prior call to the\r
+  GetDriverPath() service. This driver image handle will then be available through the               \r
+  GetDriver() service.                                                                               \r
+    \r
+  @param  This                  A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_\r
+                                PROTOCOL instance.                            \r
+  @param  ControllerHandle      The device handle of the controller.                                                             \r
+  @param  DriverImagePath       A pointer to the driver device path that was returned in a prior\r
+                                call to GetDriverPath().                                                                        \r
+  @param  DriverImageHandle     The driver image handle that was returned by LoadImage()\r
+                                when the driver specified by DriverImagePath was loaded \r
+                                into memory.                                            \r
+                                \r
+  @retval EFI_SUCCESS           The association between DriverImagePath and                   \r
+                                DriverImageHandle was established for the controller specified\r
+                                by ControllerHandle.                                                                            \r
+  @retval EFI_UNSUPPORTED       The operation is not supported.                                \r
+  @retval EFI_NOT_FOUND         DriverImagePath is not a device path that was returned on a prior\r
+                                call to GetDriverPath() for the controller specified by          \r
+                                ControllerHandle.                                                \r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid device handle.\r
+  @retval EFI_INVALID_PARAMETER DriverImagePath is not a valid device path.\r
+  @retval EFI_INVALID_PARAMETER DriverImageHandle is not a valid image handle.\r
+                                   \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED) (\r
+  IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL          *This,\r
+  IN EFI_HANDLE                                     ControllerHandle,\r
+  IN EFI_DEVICE_PATH_PROTOCOL                       *DriverImagePath,\r
+  IN EFI_HANDLE                                     DriverImageHandle\r
+  );\r
+\r
+//\r
+// Interface structure for the Platform Driver Override Protocol\r
+//\r
+struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL {\r
+  EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER       GetDriver;\r
+  EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH  GetDriverPath;\r
+  EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED    DriverLoaded;\r
+};\r
+\r
+extern EFI_GUID gEfiPlatformDriverOverrideProtocolGuid;\r
+\r
+#endif\r