| 1 |
//! Platform Driver Override Protocol |
| 2 |
//! |
| 3 |
//! This protocol matches one or more drivers to a controller. A platform driver |
| 4 |
//! produces this protocol, and it is installed on a separate handle. This |
| 5 |
//! protocol is used by the `EFI_BOOT_SERVICES.ConnectController()` boot service |
| 6 |
//! to select the best driver for a controller. All of the drivers returned by |
| 7 |
//! this protocol have a higher precedence than drivers found from an EFI Bus |
| 8 |
//! Specific Driver Override Protocol or drivers found from the general UEFI |
| 9 |
//! driver binding search algorithm. If more than one driver is returned by this |
| 10 |
//! protocol, then the drivers are returned in order from highest precedence to |
| 11 |
//! lowest precedence. |
| 12 |
|
| 13 |
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields( |
| 14 |
0x6b30c738, |
| 15 |
0xa391, |
| 16 |
0x11d4, |
| 17 |
0x9a, |
| 18 |
0x3b, |
| 19 |
&[0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d], |
| 20 |
); |
| 21 |
|
| 22 |
pub type ProtocolGetDriver = eficall! {fn( |
| 23 |
*mut Protocol, |
| 24 |
crate::base::Handle, |
| 25 |
*mut crate::base::Handle, |
| 26 |
) -> crate::base::Status}; |
| 27 |
|
| 28 |
pub type ProtocolGetDriverPath = eficall! {fn( |
| 29 |
*mut Protocol, |
| 30 |
crate::base::Handle, |
| 31 |
*mut *mut crate::protocols::device_path::Protocol |
| 32 |
) -> crate::base::Status}; |
| 33 |
|
| 34 |
pub type ProtocolDriverLoaded = eficall! {fn( |
| 35 |
*mut Protocol, |
| 36 |
crate::base::Handle, |
| 37 |
*mut crate::protocols::device_path::Protocol, |
| 38 |
crate::base::Handle, |
| 39 |
) -> crate::base::Status}; |
| 40 |
|
| 41 |
#[repr(C)] |
| 42 |
pub struct Protocol { |
| 43 |
pub get_driver: ProtocolGetDriver, |
| 44 |
pub get_driver_path: ProtocolGetDriverPath, |
| 45 |
pub driver_loaded: ProtocolDriverLoaded, |
| 46 |
} |