diff --git a/uefi-raw/CHANGELOG.md b/uefi-raw/CHANGELOG.md index 900ed58a1..540a302d9 100644 --- a/uefi-raw/CHANGELOG.md +++ b/uefi-raw/CHANGELOG.md @@ -4,6 +4,7 @@ - Added `protocol::string::UnicodeCollationProtocol`. - Added `protocol::tcg` module, containing the TCG v1 and v2 protocols. +- Added `DriverBindingProtocol`. # uefi-raw - 0.9.0 (2024-10-23) diff --git a/uefi-raw/src/protocol/driver.rs b/uefi-raw/src/protocol/driver.rs index 52584d101..f474c3299 100644 --- a/uefi-raw/src/protocol/driver.rs +++ b/uefi-raw/src/protocol/driver.rs @@ -1,5 +1,34 @@ +use crate::protocol::device_path::DevicePathProtocol; use crate::{guid, Guid, Handle, Status}; +#[derive(Debug)] +#[repr(C)] +pub struct DriverBindingProtocol { + pub supported: unsafe extern "efiapi" fn( + this: *const Self, + controller_handle: Handle, + remaining_device_path: *const DevicePathProtocol, + ) -> Status, + pub start: unsafe extern "efiapi" fn( + this: *const Self, + controller_handle: Handle, + remaining_device_path: *const DevicePathProtocol, + ) -> Status, + pub stop: unsafe extern "efiapi" fn( + this: *const Self, + controller_handle: Handle, + number_of_children: usize, + child_handle_buffer: *const Handle, + ) -> Status, + pub version: u32, + pub image_handle: Handle, + pub driver_binding_handle: Handle, +} + +impl DriverBindingProtocol { + pub const GUID: Guid = guid!("18a031ab-b443-4d1a-a5c0-0c09261e9f71"); +} + #[derive(Debug)] #[repr(C)] pub struct ComponentName2Protocol {