Skip to content

uefi-raw: Add binding for EFI_DEVICE_PATH_UTILITIES_PROTOCOL #1598

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
Apr 1, 2025
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 @@ -11,6 +11,7 @@
- Added `ExtScsiPassThruProtocol`.
- Added `NvmExpressPassThruProtocol`.
- Added `AtaPassThruProtocol`.
- Added `DevicePathUtilitiesProtocol`.


# uefi-raw - 0.10.0 (2025-02-07)
Expand Down
37 changes: 37 additions & 0 deletions uefi-raw/src/protocol/device_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,40 @@ pub struct DevicePathFromTextProtocol {
impl DevicePathFromTextProtocol {
pub const GUID: Guid = guid!("05c99a21-c70f-4ad2-8a5f-35df3343f51e");
}

#[derive(Debug)]
#[repr(C)]
pub struct DevicePathUtilitiesProtocol {
pub get_device_path_size:
unsafe extern "efiapi" fn(device_path: *const DevicePathProtocol) -> usize,
pub duplicate_device_path: unsafe extern "efiapi" fn(
device_path: *const DevicePathProtocol,
) -> *const DevicePathProtocol,
pub append_device_path: unsafe extern "efiapi" fn(
src1: *const DevicePathProtocol,
src2: *const DevicePathProtocol,
) -> *const DevicePathProtocol,
pub append_device_node: unsafe extern "efiapi" fn(
device_path: *const DevicePathProtocol,
device_node: *const DevicePathProtocol,
) -> *const DevicePathProtocol,
pub append_device_path_instance: unsafe extern "efiapi" fn(
device_path: *const DevicePathProtocol,
device_path_instance: *const DevicePathProtocol,
) -> *const DevicePathProtocol,
pub get_next_device_path_instance: unsafe extern "efiapi" fn(
device_path_instance: *mut *const DevicePathProtocol,
device_path_instance_size: *mut usize,
) -> *const DevicePathProtocol,
pub is_device_path_multi_instance:
unsafe extern "efiapi" fn(device_path: *const DevicePathProtocol) -> bool,
pub create_device_node: unsafe extern "efiapi" fn(
node_type: DeviceType,
node_sub_type: DeviceSubType,
node_length: u16,
) -> *const DevicePathProtocol,
}

impl DevicePathUtilitiesProtocol {
pub const GUID: Guid = guid!("0379be4e-d706-437d-b037-edb82fb772a4");
}
Loading