Skip to content

uefi-raw: Add DriverBindingProtocol #1487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions uefi-raw/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
29 changes: 29 additions & 0 deletions uefi-raw/src/protocol/driver.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Loading