| 1 |
//! Disk I/O Protocol |
| 2 |
//! |
| 3 |
//! Abstracts block accesses of the Block I/O protocol to a more general offset-length protocol. |
| 4 |
//! Firmware is responsible for adding this protocol to any Block I/O interface that appears |
| 5 |
//! in the system that does not already have a Disk I/O protocol. File systems and other disk |
| 6 |
//! access code utilize the Disk I/O protocol. |
| 7 |
|
| 8 |
pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields( |
| 9 |
0xce345171, |
| 10 |
0xba0b, |
| 11 |
0x11d2, |
| 12 |
0x8e, |
| 13 |
0x4f, |
| 14 |
&[0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b], |
| 15 |
); |
| 16 |
|
| 17 |
pub const REVISION: u64 = 0x0000000000010000u64; |
| 18 |
|
| 19 |
pub type ProtocolReadDisk = eficall! {fn( |
| 20 |
*mut Protocol, |
| 21 |
u32, |
| 22 |
u64, |
| 23 |
usize, |
| 24 |
*mut core::ffi::c_void, |
| 25 |
) -> crate::base::Status}; |
| 26 |
|
| 27 |
pub type ProtocolWriteDisk = eficall! {fn( |
| 28 |
*mut Protocol, |
| 29 |
u32, |
| 30 |
u64, |
| 31 |
usize, |
| 32 |
*mut core::ffi::c_void, |
| 33 |
) -> crate::base::Status}; |
| 34 |
|
| 35 |
#[repr(C)] |
| 36 |
pub struct Protocol { |
| 37 |
pub revision: u64, |
| 38 |
pub read_disk: ProtocolReadDisk, |
| 39 |
pub write_disk: ProtocolWriteDisk, |
| 40 |
} |