Skip to content

Commit 3102b04

Browse files
committed
uefi-raw: Add DriverBindingProtocol
Add the interface for EFI_DRIVER_BINDING_PROTOCOL. Ref: UEFI 2.10: 11.1 EFI Driver Binding Protocol Signed-off-by: Tim Crawford <[email protected]>
1 parent 72d484f commit 3102b04

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

uefi-raw/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Added `protocol::string::UnicodeCollationProtocol`.
66
- Added `protocol::tcg` module, containing the TCG v1 and v2 protocols.
7+
- Added `DriverBindingProtocol`.
78

89

910
# uefi-raw - 0.9.0 (2024-10-23)

uefi-raw/src/protocol/driver.rs

+29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
1+
use crate::protocol::device_path::DevicePathProtocol;
12
use crate::{guid, Guid, Handle, Status};
23

4+
#[derive(Debug)]
5+
#[repr(C)]
6+
pub struct DriverBindingProtocol {
7+
pub supported: unsafe extern "efiapi" fn(
8+
this: *const Self,
9+
controller_handle: Handle,
10+
remaining_device_path: *const DevicePathProtocol,
11+
) -> Status,
12+
pub start: unsafe extern "efiapi" fn(
13+
this: *const Self,
14+
controller_handle: Handle,
15+
remaining_device_path: *const DevicePathProtocol,
16+
) -> Status,
17+
pub stop: unsafe extern "efiapi" fn(
18+
this: *const Self,
19+
controller_handle: Handle,
20+
number_of_children: usize,
21+
child_handle_buffer: *const Handle,
22+
) -> Status,
23+
pub version: u32,
24+
pub image_handle: Handle,
25+
pub driver_binding_handle: Handle,
26+
}
27+
28+
impl DriverBindingProtocol {
29+
pub const GUID: Guid = guid!("18a031ab-b443-4d1a-a5c0-0c09261e9f71");
30+
}
31+
332
#[derive(Debug)]
433
#[repr(C)]
534
pub struct ComponentName2Protocol {

0 commit comments

Comments
 (0)