2007-06-19 12:12:02 +02:00
|
|
|
/** @file
|
2007-11-22 07:00:39 +01:00
|
|
|
Platform Driver Override protocol as defined in the UEFI 2.1 specification.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
|
|
This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H__
|
|
|
|
#define __EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_H__
|
|
|
|
|
2008-08-14 06:29:48 +02:00
|
|
|
///
|
|
|
|
/// Global ID for the Platform Driver Override Protocol
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
#define EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL_GUID \
|
|
|
|
{ \
|
|
|
|
0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Prototypes for the Platform Driver Override Protocol
|
|
|
|
//
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
/**
|
2007-06-19 12:12:02 +02:00
|
|
|
Retrieves the image handle of the platform override driver for a controller in the system.
|
2018-06-27 15:11:33 +02:00
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
@param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_
|
2018-06-27 15:11:33 +02:00
|
|
|
PROTOCOL instance.
|
2007-06-19 12:12:02 +02:00
|
|
|
@param ControllerHandle The device handle of the controller to check if a driver override
|
2018-06-27 15:11:33 +02:00
|
|
|
exists.
|
2007-06-19 12:12:02 +02:00
|
|
|
@param DriverImageHandle On input, a pointer to the previous driver image handle returned
|
2018-06-27 15:11:33 +02:00
|
|
|
by GetDriver(). On output, a pointer to the next driver
|
|
|
|
image handle.
|
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_SUCCESS The driver override for ControllerHandle was returned in
|
2018-06-27 15:11:33 +02:00
|
|
|
DriverImageHandle.
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_NOT_FOUND A driver override for ControllerHandle was not found.
|
2011-07-06 05:44:35 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER The handle specified by ControllerHandle is NULL.
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER DriverImageHandle is not a handle that was returned on a
|
2018-06-27 15:11:33 +02:00
|
|
|
previous call to GetDriver().
|
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER)(
|
2007-06-19 12:12:02 +02:00
|
|
|
IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
|
|
|
|
IN EFI_HANDLE ControllerHandle,
|
|
|
|
IN OUT EFI_HANDLE *DriverImageHandle
|
|
|
|
);
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
/**
|
2007-06-19 12:12:02 +02:00
|
|
|
Retrieves the device path of the platform override driver for a controller in the system.
|
2018-06-27 15:11:33 +02:00
|
|
|
|
2011-07-06 05:44:35 +02:00
|
|
|
@param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL instance.
|
2007-06-19 12:12:02 +02:00
|
|
|
@param ControllerHandle The device handle of the controller to check if a driver override
|
2018-06-27 15:11:33 +02:00
|
|
|
exists.
|
2009-02-09 03:08:57 +01:00
|
|
|
@param DriverImagePath On input, a pointer to the previous driver device path returned by
|
|
|
|
GetDriverPath(). On output, a pointer to the next driver
|
2009-06-04 07:49:29 +02:00
|
|
|
device path. Passing in a pointer to NULL will return the first
|
2009-02-09 03:08:57 +01:00
|
|
|
driver device path for ControllerHandle.
|
2018-06-27 15:11:33 +02:00
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_SUCCESS The driver override for ControllerHandle was returned in
|
2018-06-27 15:11:33 +02:00
|
|
|
DriverImageHandle.
|
|
|
|
@retval EFI_UNSUPPORTED The operation is not supported.
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_NOT_FOUND A driver override for ControllerHandle was not found.
|
2011-07-06 05:44:35 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER The handle specified by ControllerHandle is NULL.
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER DriverImagePath is not a device path that was returned on a
|
2018-06-27 15:11:33 +02:00
|
|
|
previous call to GetDriverPath().
|
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH)(
|
2007-06-19 12:12:02 +02:00
|
|
|
IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
|
|
|
|
IN EFI_HANDLE ControllerHandle,
|
|
|
|
IN OUT EFI_DEVICE_PATH_PROTOCOL **DriverImagePath
|
|
|
|
);
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
/**
|
2007-06-19 12:12:02 +02:00
|
|
|
Used to associate a driver image handle with a device path that was returned on a prior call to the
|
2018-06-27 15:11:33 +02:00
|
|
|
GetDriverPath() service. This driver image handle will then be available through the
|
|
|
|
GetDriver() service.
|
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
@param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_
|
2018-06-27 15:11:33 +02:00
|
|
|
PROTOCOL instance.
|
|
|
|
@param ControllerHandle The device handle of the controller.
|
2007-06-19 12:12:02 +02:00
|
|
|
@param DriverImagePath A pointer to the driver device path that was returned in a prior
|
2018-06-27 15:11:33 +02:00
|
|
|
call to GetDriverPath().
|
2007-06-19 12:12:02 +02:00
|
|
|
@param DriverImageHandle The driver image handle that was returned by LoadImage()
|
2018-06-27 15:11:33 +02:00
|
|
|
when the driver specified by DriverImagePath was loaded
|
|
|
|
into memory.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The association between DriverImagePath and
|
2007-06-19 12:12:02 +02:00
|
|
|
DriverImageHandle was established for the controller specified
|
2018-06-27 15:11:33 +02:00
|
|
|
by ControllerHandle.
|
|
|
|
@retval EFI_UNSUPPORTED The operation is not supported.
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_NOT_FOUND DriverImagePath is not a device path that was returned on a prior
|
2018-06-27 15:11:33 +02:00
|
|
|
call to GetDriverPath() for the controller specified by
|
|
|
|
ControllerHandle.
|
2011-07-06 05:44:35 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
2007-06-19 12:12:02 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER DriverImagePath is not a valid device path.
|
|
|
|
@retval EFI_INVALID_PARAMETER DriverImageHandle is not a valid image handle.
|
2018-06-27 15:11:33 +02:00
|
|
|
|
2007-06-19 12:12:02 +02:00
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 09:14:18 +02:00
|
|
|
(EFIAPI *EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED)(
|
2007-06-19 12:12:02 +02:00
|
|
|
IN EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL *This,
|
|
|
|
IN EFI_HANDLE ControllerHandle,
|
|
|
|
IN EFI_DEVICE_PATH_PROTOCOL *DriverImagePath,
|
|
|
|
IN EFI_HANDLE DriverImageHandle
|
|
|
|
);
|
|
|
|
|
2008-10-13 04:54:29 +02:00
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// This protocol matches one or more drivers to a controller. A platform driver
|
|
|
|
/// produces this protocol, and it is installed on a separate handle. This protocol
|
|
|
|
/// is used by the ConnectController() boot service to select the best driver
|
|
|
|
/// for a controller. All of the drivers returned by this protocol have a higher
|
|
|
|
/// precedence than drivers found from an EFI Bus Specific Driver Override Protocol
|
|
|
|
/// or drivers found from the general UEFI driver Binding search algorithm. If more
|
|
|
|
/// than one driver is returned by this protocol, then the drivers are returned in
|
2008-10-13 04:54:29 +02:00
|
|
|
/// order from highest precedence to lowest precedence.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL {
|
|
|
|
EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
|
|
|
|
EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH GetDriverPath;
|
|
|
|
EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED DriverLoaded;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiPlatformDriverOverrideProtocolGuid;
|
|
|
|
|
|
|
|
#endif
|