Skip to content

Commit 5436558

Browse files
committed
uefi-raw: add Storage Security Command protocol type definitions
1 parent bbe1c5a commit 5436558

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

uefi-raw/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Added
44
- Added `Tcpv4Protocol`.
5+
- Added `StorageSecurityCommandProtocol`.
56

67
## Changed
78

uefi-raw/src/protocol/media.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,32 @@ pub struct LoadFile2Protocol {
3535
impl LoadFile2Protocol {
3636
pub const GUID: Guid = guid!("4006c0c1-fcb3-403e-996d-4a6c8724e06d");
3737
}
38+
39+
#[derive(Debug)]
40+
#[repr(C)]
41+
pub struct StorageSecurityCommandProtocol {
42+
pub receive_data: unsafe extern "efiapi" fn(
43+
this: *mut Self,
44+
media_id: u32,
45+
timeout: u64,
46+
security_protocol: u8,
47+
security_protocol_specific_data: u16,
48+
buffer_size: usize,
49+
buffer: *mut c_void,
50+
transfer_size: *mut usize,
51+
) -> Status,
52+
53+
pub send_data: unsafe extern "efiapi" fn(
54+
this: *mut Self,
55+
media_id: u32,
56+
timeout: u64,
57+
security_protocol: u8,
58+
security_protocol_specific_data: u16,
59+
buffer_size: usize,
60+
buffer: *const c_void,
61+
) -> Status,
62+
}
63+
64+
impl StorageSecurityCommandProtocol {
65+
pub const GUID: Guid = guid!("c88b0b6d-0dfc-49a7-9cb4-49074b4c3a78");
66+
}

0 commit comments

Comments
 (0)